Hello Han,
The basic outline is that Quantopian uses a live data feed called Nanex Nxcore (see https://www.quantopian.com/faq#data). On-the-fly, they compute OHLCV minutely bars as the data come in. So, when handle_data is called, your algorithm has access to the latest minutely bar, and the closing price (same as data[sid].price) falls somewhere in time within that trailing minute. There are no timestamps on the individual OHLC values, so there is no way to know how much time has elapsed between the OHLC market trade events and the call to handle_data.
Regarding "the time for Quantopian to run handle_data and send execution order to IB," Jonathan Kamens recently provided some data, and the timing is on the order of a second or more (see https://www.quantopian.com/posts/skip-avoid-bypass-ignore-handle-data-using-schedule-function-only). As he points out, if there is significant data processing by the algorithm during the handle_data call, then the delay will be longer (it could be up to 50 seconds, beyond which the algo will timeout and crash).
I would caution you in assuming tight timing, since it is not clear how much overall latency and timing jitter (and glitching) there is between the market events that drive the Nanex Nxcore data feed and the execution of orders at Interactive Brokers. I'd consider it to be a minute-level-timing, pseudo-real-time system at this point, until more information is provided.
Grant