Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: e13bca3189cdd1c5cd76e3103d81b38fc338ad1c
Ticket: 1202178fffffffffffffffffffffffffffffffff
Change [time] to return a float for count>1
User & Date: das on 2005-05-15 02:43:34
Changes

  1. assignee changed to: "hobbs"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    When [time]ing a script of short duration for many counts, a lot of 
    measured precision is lost because [time] only returns an integer 
    number of microseconds.
    
    The attached very simple patch changes [time] to return a list with 
    a string rep identical to the current result string, except that the 
    returned time is a DoubleObj for count>1 (and an IntObj for 
    count==1)
    
    For things like tclbench that do [lindex 0] on the return value of 
    [time] this transparently avoids string conversion of the 
    microseconds value...
    
    I'm not sure if this change would require a TIP? it does change 
    the public API of [time] but in a way that seems innocous...
    
  4. foundin changed to: "obsolete: 8.5a3"
  5. priority changed to: "6"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "das"
  9. subsystem changed to: "18. Commands M-Z"
  10. title changed to: "Change [time] to return a float for count>1"
  11. type changed to: "Bug"