mirror of
https://github.com/yuzu-emu/FasTC
synced 2024-11-23 15:13:59 +00:00
Change unix clock to realtime
This commit is contained in:
parent
278a59e24a
commit
f2b9c39801
1 changed files with 2 additions and 2 deletions
|
@ -35,12 +35,12 @@ StopWatch::StopWatch() : impl(new StopWatchImpl) {
|
|||
}
|
||||
|
||||
void StopWatch::Start() {
|
||||
clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &(impl->ts));
|
||||
clock_gettime(CLOCK_REALTIME, &(impl->ts));
|
||||
impl->timer = double(impl->ts.tv_sec) + 1e-9 * double(impl->ts.tv_nsec);
|
||||
}
|
||||
|
||||
void StopWatch::Stop() {
|
||||
clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &(impl->ts));
|
||||
clock_gettime(CLOCK_REALTIME, &(impl->ts));
|
||||
impl->duration = -(impl->timer) + (double(impl->ts.tv_sec) + 1e-9 * double(impl->ts.tv_nsec));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue