CLOCK(3I) Last changed: 1-6-98
CLOCK - Returns the current time
EXTERNAL CLOCK
CALL CLOCK (time)
INTRINSIC CLOCK [Toc] [Back]
CLOCK ()
UNICOS, UNICOS/mk, and IRIX systems
CF90 and MIPSpro 7 Fortran 90 compiler extension to Fortran 90
CLOCK obtains the current time, in ASCII hh:mm:ss format, from the
real-time clock.
As an intrinsic function, CLOCK accepts no arguments. The name of
this intrinsic cannot be passed as an argument.
The following argument is valid when CLOCK is called as an external
subprogram:
time A variable containing the time in hh:mm:ss format. The data type
of time depends on your platform, as follows:
* On UNICOS or UNICOS/mk systems, it must be of type integer,
CHARACTER*8, or real. If time is of type integer or real, it
must be of KIND=8.
* On IRIX systems, it must be declared as type CHARACTER*8.
When called as an intrinsic function, the data type of the return
value depends on your platform. On UNICOS and UNICOS/mk systems, the
return value is of type Boolean. On IRIX systems, it is of type
CHARACTER*8.
For Fortran 90 programs, the CLOCK intrinsic function is outmoded.
Refer to the Fortran Language Reference Manual, Volume 3, publication
SR-3905, for information on outmoded features and their preferred
standard alternatives.
On IRIX systems, you can use either the intrinsic function form or the
external subprogram form, but not both, in a single processing unit
(PU).
Intrinsic Procedures Reference Manual, publication SR-2138, for the
printed version of this man page.
CLOCK(3C) CLOCK(3C)
clock - report CPU time used
#include <time.h>
clock_t clock (void);
clock returns the amount of CPU time used since the first call to clock.
The unit time of clock (microseconds) is indicated in the macro
CLOCKS_PER_SEC found in the file <time.h>. The time reported is the sum
of the user and system times of the calling process and its terminated
child processes for which it has executed wait(2), pclose(3S), or
system(3S).
The resolution of the clock is 10 milliseconds on IRIS workstations.
times(2), wait(2), popen(3S), system(3S).
The implementation of clock conflicts with the definition of the routine
found in the ANSI C Standard. The discrepancy will be transparent,
however, so long as programs which adhere to that Standard use the
difference in two invocations of clock for timing information, as
recommended by the Standard.
The value returned by clock is defined in microseconds for compatibility
with systems that have CPU clocks with much higher resolution. Because
of this, the value returned will wrap around after accumulating only 2147
seconds of CPU time (about 36 minutes).
Page 1
CLOCK(3I) Last changed: 1-6-98
CLOCK - Returns the current time
EXTERNAL CLOCK
CALL CLOCK (time)
INTRINSIC CLOCK [Toc] [Back]
CLOCK ()
UNICOS, UNICOS/mk, and IRIX systems
CF90 and MIPSpro 7 Fortran 90 compiler extension to Fortran 90
CLOCK obtains the current time, in ASCII hh:mm:ss format, from the
real-time clock.
As an intrinsic function, CLOCK accepts no arguments. The name of
this intrinsic cannot be passed as an argument.
The following argument is valid when CLOCK is called as an external
subprogram:
time A variable containing the time in hh:mm:ss format. The data type
of time depends on your platform, as follows:
* On UNICOS or UNICOS/mk systems, it must be of type integer,
CHARACTER*8, or real. If time is of type integer or real, it
must be of KIND=8.
* On IRIX systems, it must be declared as type CHARACTER*8.
When called as an intrinsic function, the data type of the return
value depends on your platform. On UNICOS and UNICOS/mk systems, the
return value is of type Boolean. On IRIX systems, it is of type
CHARACTER*8.
For Fortran 90 programs, the CLOCK intrinsic function is outmoded.
Refer to the Fortran Language Reference Manual, Volume 3, publication
SR-3905, for information on outmoded features and their preferred
standard alternatives.
On IRIX systems, you can use either the intrinsic function form or the
external subprogram form, but not both, in a single processing unit
(PU).
Intrinsic Procedures Reference Manual, publication SR-2138, for the
printed version of this man page.
[ Back ]
|