![]() |
FastPolyEval
1.0
Fast Evaluation of Real and Complex Polynomials
|
Tools for precise time measuring. More...
Go to the source code of this file.
Macros | |
#define | BILLION 1000000000L |
One billion (nanoseconds in one second). | |
#define | MILLION 1000000L |
One billion (miliseconds in one second). | |
#define | MINUTE 60000L |
Miliseconds in one minute. | |
#define | HOUR (60 * MINUTE) |
Miliseconds in one hour. | |
#define | DAY (24 * HOUR) |
Miliseconds in one day. | |
#define | USED_CLOCK CLOCK_MONOTONIC |
The ID of the system clock to use. | |
Typedefs | |
typedef struct timespec | ptime |
Short type name for precise time. | |
Functions | |
void | millis (long ms, char *str) |
Formats the time duration in miliseconds ms into human readable string str . More... | |
void | nanos (long ns, char *str) |
Formats the time duration in nanoseconds ns into human readable string str . More... | |
ulong | lap (ptime *ts, char *str) |
Computes and prints the time lapse since ts . More... | |
void | print_time_res (void) |
Prints the timer resolution. | |
Tools for precise time measuring.
Definition in file chrono.h.
Computes and prints the time lapse since ts
.
Pretty prints the elapsed time into the string str
and updates ts
to the current time. Does not fail if str==NULL
, can also be used as a starter for the chronometer.
str
should be at least 90
bytes long.ts | old time stamp |
str | human readable string for the time increment |
void millis | ( | long | ms, |
char * | str | ||
) |
Formats the time duration in miliseconds ms
into human readable string str
.
str
should be at least 90
bytes long.ms | the time lapse in miliseconds |
str | the human readable print |
void nanos | ( | long | ns, |
char * | str | ||
) |
Formats the time duration in nanoseconds ns
into human readable string str
.
str
should be at least 90
bytes long.ns | the time lapse in miliseconds |
str | the human readable print |