- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
_data_provider.request(DataProvider.GET_USER_INFO,
{
onComplete: function(data)
{
self._user_info.user_id = data.user_id;
self._user_info.user_name = data.user_name;
// Make next request after 500 ms delay because of API restriction (3 reqsts per second)
setTimeout(function()
{
self._data_provider.request(DataProvider.GET_SERVER_TIME,
{
onComplete: function(data)
{
var current_time = (new Date()).getTime();
self._time_offset = current_time - parseInt(data) * 1000;
dispatchEvent(new DataAccessEvent(DataAccessor.INIT));
}
});
}, 500);
}
});
Комментарии (0) RSS
Добавить комментарий