Rounding error calculating now_us on Windows platforms.

Description

When trying out ZMQ on an embedded device with Windows Embedded Compact 7, we discovered timer events were never firing.

After some debugging we traced this down to the now_us calculation in clock.cpp. On our device, ticksPerSecond.QuadPart is < 1000000 making ticks_div zero and resulting in an invalid time.

double ticks_div = (double) (ticksPerSecond.QuadPart / 1000000);
return (uint64_t) (tick.QuadPart / ticks_div);

Environment

Windows Embedded Compact 7 (WEC7), ARM device

Activity

Show:
Duane Littleton
March 1, 2013, 4:26 PM
Fixed

Assignee

Unassigned

Reporter

Duane Littleton

Labels

None

Components

Fix versions

Affects versions

Priority

Minor