TIP #209 Version 1.1: Add [clock milliseconds], and [clock microseconds]

This is not necessarily the current version of this TIP.


TIP:209
Title:Add [clock milliseconds], and [clock microseconds]
Version:$Revision: 1.1 $
Author:Reinhard Max <max at tclers dot tk>
State:Draft
Type:Project
Tcl-Version:8.5
Vote:Pending
Created:Monday, 12 July 2004
Keywords:clock milliseconds microseconds

Abstract

This TIP proposes to replace [clock clicks -milliseconds] by [clock milliseconds] and [clock clicks -microseconds] by [clock microseconds].

Proposed change

  1. Rename the [clock clicks -microseconds] command as defined by TIP 124 to [clock microseconds].

  2. Deprecate [clock clicks -milliseconds], and make it's functionality as defined by TIP 124 available as [clock milliseconds]

Rationale

In the author's understanding, the whole purpose of the [clock clicks] name was to indicate that the returned value is neither absolute nor guaranteed to have the same unit on different platforms. With the changes of TIP 124 in place both cases are not true anymore. Therefore the commands to return absolute timestamps with millisecond and microsecond resolution should be on the same level as [clock seconds] rather than being switches to [clock clicks].

The -microseconds option can be removed from [clock clicks] immediately, because it never has been part of an official Tcl release while -milliseconds has to be kept at least until the next major release for backwards compatibility.

Reference Implementation

A reference implementation does not yet exist, but the proposed changes should be rather trivial to implement, as they only change command names, but keep the functionality.

Copyright

This document has been placed in the public domain.


Powered by TclThis is not necessarily the current version of this TIP.

TIP AutoGenerator - written by Donal K. Fellows