hide long namesshow long names
hide short namesshow short names
Integer type:  int32  int64  nag_int  show int32  show int32  show int64  show int64  show nag_int  show nag_int

PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

NAG Toolbox: nag_time_cpu (x05ba)

Purpose

nag_time_cpu (x05ba) returns the amount of processor time used since an unspecified previous time.

Syntax

[result] = x05ba
[result] = nag_time_cpu

Description

nag_time_cpu (x05ba) returns the number of seconds of processor time used since some previous time. The previous time is system dependent, but may be, for example, the time the current job or the current program started running.
If the system clock of the host machine is inaccessible for any reason, nag_time_cpu (x05ba) returns the value zero.

References

None.

Parameters

Compulsory Input Parameters

None.

Optional Input Parameters

None.

Input Parameters Omitted from the MATLAB Interface

None.

Output Parameters

1:     result – double scalar
The result of the function.

Error Indicators and Warnings

None.

Accuracy

The accuracy of the value returned depends on the accuracy of the system clock on the host machine.

Further Comments

Since the value returned by nag_time_cpu (x05ba) is the amount of processor time since some unspecified earlier time, no significance should be placed on the value other than as a marker to be compared with some later figure returned by nag_time_cpu (x05ba). The amount of processor time that has elapsed between two calls of nag_time_cpu (x05ba) can be simply calculated as the earlier value subtracted from the later value.

Example

function nag_time_cpu_example
[result] = nag_time_cpu
 

result =

    5.4812


function x05ba_example
[result] = x05ba
 

result =

    5.4592



PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2013