Skip to content

Commit

Permalink
64-bit system uptime is good enough for timers on Windows.
Browse files Browse the repository at this point in the history
Rollover is impossible.
  • Loading branch information
orbitalquark committed Feb 28, 2025
1 parent 6423bec commit f415cb2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/textadept_curses.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,10 +497,7 @@ static double get_seconds(void) {
gettimeofday(&time, NULL);
return time.tv_sec + time.tv_usec / 1.0e6;
#else
FILETIME time;
GetSystemTimeAsFileTime(&time);
// Note: interval is time.Low | (time.High << 32) in 100's of nanoseconds.
return (time.dwLowDateTime + time.dwHighDateTime * 4294967296.0) / 1.0e7;
return GetTickCount64() / 1.0e3;
#endif
}

Expand Down

0 comments on commit f415cb2

Please sign in to comment.