Initializing help system before first use

XSLPgettime

XSLPgettime


Purpose
Retrieve an integer time stamp in seconds and/or milliseconds
Synopsis
int XPRS_CC XSLPgettime(XSLPprob Prob, int *Seconds, int *MSeconds);
Arguments
Prob 
The current SLP problem.
Seconds 
Address of integer to receive the number of seconds.
MSeconds 
Address of integer to receive the number of milliseconds. May be NULL if not required.
Example
The following example prints the time elapsed in milliseconds for reading a matrix.
int Secs, MSecs, StartSecs, StartMSecs, Elapsed;
XSLPgettime(Prob, &StartSecs, &StartMSecs);
XSLPreadprob(Prob, "Matrix", "");
XSLPgettime(Prob, &Secs, &MSecs);

Elapsed = (Secs-StartSecs)*1000
          + (MSecs - StartMSecs);
printf("\nElapsed time = %d",Elapsed);

Further information

If Seconds or MilliSeconds is NULL, then the corresponding information will not be returned.

This routine relies on the accuracy of the system clock.

The clock is not initialized when Xpress NonLinear starts, so it is necessary to save an initial time and then measure all times by difference.


Related topics

© 2001-2019 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.