Skip to content

Timing utilities: GetSystemTimeFP mixes seconds and milliseconds into a seconds value but divides microseconds by 1000, not 1e6 #15

Description

@XenonofArcticus

Where: DEFGSupport.cpp, GetSystemTimeFP() (POSIX branch)

Why it’s wrong: gettimeofday returns tv_usec in microseconds; adding tv_usec / 1000.0 yields milliseconds added to seconds, not seconds. This returns seconds + milliseconds, not seconds + fractional seconds.

Evidence: Now = TimeBuf.tv_sec + TimeBuf.tv_usec / 1000.0; in POSIX path.
GitHub

Fix: Use tv_usec / 1e6.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions