Cytosim PI Cytoskeleton Simulator

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Namespace List
- Namespace Members

Functions
TicToc Namespace Reference

A set of functions related to time. More...

## Functions
void | date (char *buf, size_t buf_size)
| current date in short format, `buf` should be 26 character long or more More...
void | date (char *buf, size_t buf_size, bool no_year)
| current date in short format, `buf` should be 26 character long or more
int | date_hack (const char *)
| this is approximately the number of days after Jan 1 2000
int | day_of_the_year ()
| day of the year (0-365)
int | hours_today ()
| hour of the day (0-23)
long | seconds_today ()
| number of second since midnight
long | milli_seconds_today ()
| number of micro-second since midnight
clock_t | processor_time (char *buf, size_t buf_size, clock_t, double &sum)
| CPU time in short format, `buf` must be. More...
void | tic ()
| call to start timer
double | toc ()
| return number of milli-seconds elapsed since last call to `tic()`
double | toc (const char *msg)
| call to stop timing. Will print a message if msg!=0

## Detailed Description

Functions to get wall-time, and processor-time, from the C-standard library.

## Function Documentation

void date | ( | char * | buf,
|  | size_t | buf_size
| ) |  |

This calls the C-library functions time() and ctime_r()

clock_t processor_time | ( | char * | buf,
|  | size_t | buf_size,
|  | clock_t | old,
|  | double & | sum
| ) |  |

This calls the C-library function clock()