Function
sysTime
Returns the system time in seconds.
sysTime()
Include Headers
seqan/basic.h
Remarks
In contrast to cpuTime, the system time corresponds to the wall clock time under Linux and Mac OS X. Under Windows sysTime returns the result of cpuTime.
Use this for benchmarking uner Linux and Mac Os X.
Calls clock_gettime under Linux and gettimeofday under Mac OS X.
Return Values
A double, system time stamp in seconds.
Types: double
Examples
We can use sysTime to instrument our code for profiling/timing information quite robustly. The following demonstrates how the Function.sysTime is used in many SeqAn apps for collecting timing information.
bool printTiming = true;
// ...
double startTime = sysTime();
// Do some complex calculation.
if (printTiming)
std::cerr << "Some complex calculation too " << sysTime() - startTime << " s." << std::endl;
See Also
cpuTime
SeqAn - Sequence Analysis Library - www.seqan.de

Page built @2014/10/13 16:12:59