XSLPgettime
PurposeRetrieve an integer time stamp in seconds and/or millisecondsSynopsisint 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.ExampleThe 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 informationIf 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-SLP starts, so it is necessary to save an initial time and then measure all times by difference.
Related topics
If you have any comments or suggestions about these pages, please send mail to docs@dashoptimization.com.