TIP 73: Export Tcl_GetTime in the Public API

Login
State:          Final
Type:           Project
Tcl-Version:    8.4
Vote:           Done
Post-History:   
Author:		Kevin Kenny <[email protected]>
Created:	03-Nov-2001

Abstract

This TIP proposes that the existing TclpGetTime function be renamed to be Tcl_GetTime and included in the published API.

Rationale

The Tcl library provides a uniform abstraction, TclpGetTime that is implemented on each of the platforms to retrieve absolute time in a Tcl_Time object. This function is highly useful outside the Tcl library itself, since it hides a very complex set of interfaces, particularly on Windows, where several hundred lines of code enable its use for high-precision measurements. For this reason, it ought to be made part of the public API.

Proposed Change

The existing TclpGetTime procedure shall be renamed to be Tcl_GetTime, and its declaration shall be added to tcl.decls.

 void TclpGetTime( Tcl_Time* timePtr );

A definition of TclpGetTime as a stub procedure that simply invokes Tcl_GetTime shall be retained in tclInt.decls for compatibility with existing Stubs-enabled extensions that invoke it.

This change requires no other change to the public headers; the Tcl_Time structure is already exported in tcl.h.

Copyright

Copyright © 2001 by Kevin B. Kenny. Distribution in whole or part, with or without annotations, is unlimited.