FrenkelS / doomtd3

Stripped down version of Doom (Doom8088) for only running timedemo 3
GNU General Public License v2.0
7 stars 2 forks source link

Sub-second accuracy #2

Closed FrenkelS closed 4 months ago

FrenkelS commented 5 months ago

On the IBM PC we use clock() to calculate the frames per second. On the Macintosh Plus clock() returns -1, so we use time(NULL) instead, but that's not as accurate as clock().

FrenkelS commented 4 months ago

time(NULL) was replaced by TickCount() in this commit https://github.com/FrenkelS/doomtd3/commit/6f2ac98fc605efe38c1c39c2cc0d259d9c38778f There are 60 ticks in one second.