Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 925c772ca572d3cbc4ab1deaea8c7f27d8db0432
Ticket: 3002022fffffffffffffffffffffffffffffffff
clock microseconds broken on Windows
User & Date: kennykb on 2010-05-16 04:40:30
Changes

  1. icomment:
    The scenario that causes the problem is that QueryPerformanceCounter returns different values on different cores. And that scenario is still with us. Microsoft warns that "bugs in the HAL" may cause such behaviour and suggests that any code that uses QueryPerformanceCounter set a thread affinitiy mask to run single-core. What they don't say is that the "bug" is universal - I have yet to find multichip systems where QueryPerformanceCounter returns consistent results, and even some single-chip multicore systems seem to get out of sync.
    
    I'm really at a loss what to do with this one. We seem to be faced with a choice between restricting a Tcl process to a single core in order to get robust timing, or else giving up on submillisecond resolution. The manufacturers of Windows machines simply do not care about this problem.
    
    
  2. login: "kennykb"
  3. mimetype: "text/plain"
  4. username: "kennykb"