Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 94a2ba26b0c388f0f6eb33bfd8727e8e0c2ae31e
Ticket: b87ad7e9146832d505f9a430d779c5313c440256
NativeGetTime time-drifts bug (fixed)
User & Date: sebres on 2017-01-06 16:45:49
Changes

  1. icomment:
    All examples above expected my faster clock engine (each iteration should call clock command and runs ca. 0.9µs, so the big iteration running ca. 500ms)...
    
    Therefore an example with the stock tcl-clock, that produces it in my case also.
    
    If you've faster/slower mashine you should correct speedFactor variable to reach above mentioned values (0.9µs / 0.5 sec).
    
    Otherwise it may be hard (or you should wait longer) to reproduce this bug.
    
    ```
    % set speedFactor 62; set p [clock microseconds]; time { puts "[time {string repeat "t" $speedFactor; clock microseconds} 566000]\t**** [set n [clock microseconds]] -- [expr {$n - $p}]"; set p $n } 100
    
    0.8695459363957597 microseconds per iteration   **** 1483720212343459 -- 492475
    0.8817173144876325 microseconds per iteration   **** 1483720212842870 -- 499411
    0.8644752650176678 microseconds per iteration   **** 1483720213332515 -- 489645
    0.8931360424028268 microseconds per iteration   **** 1483720213838395 -- 505880
    0.860083038869258 microseconds per iteration    **** 1483720214325544 -- 487149
    0.8739275618374558 microseconds per iteration   **** 1483720214820499 -- 494955
    0.872791519434629 microseconds per iteration    **** 1483720215314796 -- 494297
    0.8781908127208481 microseconds per iteration   **** 1483720215812055 -- 497259
    0.8626166077738516 microseconds per iteration   **** 1483720216300627 -- 488572
    0.8843833922261484 microseconds per iteration   **** 1483720216801552 -- 500925
    0.8563657243816254 microseconds per iteration   **** 1483720217286400 -- 484848
    0.8794487632508834 microseconds per iteration   **** 1483720217784535 -- 498135
    0.866613074204947 microseconds per iteration    **** 1483720218275245 -- 490710
    --------------------------------------------------------------------------------
    2.663030035335689 microseconds per iteration    **** 1483720219782771 -- 1507526
    --------------------------------------------------------------------------------
    0.8599045936395759 microseconds per iteration   **** 1483720220269726 -- 486955
    0.8882826855123674 microseconds per iteration   **** 1483720220772700 -- 502974
    0.8582491166077738 microseconds per iteration   **** 1483720221258731 -- 486031
    0.888178445229682 microseconds per iteration    **** 1483720221761694 -- 502963
    0.8821819787985866 microseconds per iteration   **** 1483720222261384 -- 499690
    0.8775848056537102 microseconds per iteration   **** 1483720222758350 -- 496966
    0.8601201413427562 microseconds per iteration   **** 1483720223245408 -- 487058
    0.8903939929328621 microseconds per iteration   **** 1483720223749622 -- 504214
    ```
    
  2. login: "sebres"
  3. mimetype: "text/plain"