This is gambit-c.info, produced by makeinfo version 4.7 from gambit-c.txi. START-INFO-DIR-ENTRY * Gambit-C: (gambit-c). A portable implementation of Scheme. * gsi: (gambit-c) interpreter. Gambit interpreter. * gsc: (gambit-c) compiler. Gambit compiler. END-INFO-DIR-ENTRY This file documents Gambit-C, a portable implementation of Scheme. Copyright (C) 1994-2006 Marc Feeley. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the copyright holder.  File: gambit-c.info, Node: Measuring time, Next: File information, Prev: Environment variables, Up: Host environment 16.7 Measuring time =================== Procedures are available for measuring real time (aka "wall" time) and cpu time (the amount of time the cpu has been executing the process). The resolution of the real time and cpu time clock is operating system dependent. Typically the resolution of the cpu time clock is rather coarse (measured in "ticks" of 1/60th or 1/100th of a second). Real time is internally computed relative to some arbitrary point in time using floating point numbers, which means that there is a gradual loss of resolution as time elapses. Moreover, some operating systems report time in number of ticks using a 32 bit integer so the value returned by the time related procedures may wraparound much before any significant loss of resolution occurs (for example 2.7 years if ticks are 1/50th of a second). -- procedure: current-time -- procedure: time? OBJ -- procedure: time->seconds TIME -- procedure: seconds->time X The procedure `current-time' returns a "time object" representing the current point in real time. The procedure `time?' returns `#t' when OBJ is a time object and `#f' otherwise. The procedure `time->seconds' converts the time object TIME into an inexact real number representing the number of seconds elapsed since the "epoch" (which is 00:00:00 Coordinated Universal Time 01-01-1970). The procedure `seconds->time' converts the real number X representing the number of seconds elapsed since the "epoch" into a time object. For example: > (current-time) #