mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 12:43:09 +00:00
starttime
This commit is contained in:
@@ -234,6 +234,9 @@ skynet_timer_init(void) {
|
|||||||
TI->current = _gettime();
|
TI->current = _gettime();
|
||||||
|
|
||||||
struct timespec ti;
|
struct timespec ti;
|
||||||
clock_gettime(CLOCK_MONOTONIC, &ti);
|
clock_gettime(CLOCK_REALTIME, &ti);
|
||||||
TI->starttime = (uint32_t)(ti.tv_sec & 0xff000000);
|
uint32_t sec = (uint32_t)ti.tv_sec;
|
||||||
|
uint32_t mono = _gettime() / 100;
|
||||||
|
|
||||||
|
TI->starttime = sec - mono;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user