mmgs
chrono.c File Reference

Simulation of a chronograph. More...

#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include "chrono.h"
Include dependency graph for chrono.c:

Functions

void chrono (int cmode, mytime *ptt)
 Function to measure time. More...
 
void tminit (mytime *t, int maxtim)
 Initialize mytime object. More...
 
void printim (double elps, char *stim)
 Print real time. More...
 

Detailed Description

Simulation of a chronograph.

Author
Cécile Dobrzynski (Bx INP/Inria/UBordeaux)
Pascal Frey (UPMC)
Version
5
Date
08 2010

Simulation of a chronograph. Allow parallel usage.

Function Documentation

◆ chrono()

void chrono ( int  cmode,
mytime ptt 
)

Function to measure time.

Parameters
cmodemacro that allow to reset (RESET), start (ON) or stop (OFF) the chrono.
*pttpointer toward mytime object that store the chronograph informations.

◆ printim()

void printim ( double  elps,
char *  stim 
)

Print real time.

Parameters
elpselapsed time in seconds.
stimpointer toward string containg the elapsed time at .h.m.s format.

◆ tminit()

void tminit ( mytime t,
int  maxtim 
)

Initialize mytime object.

Parameters
*tmytime object to store the chronograph infos.
maxtiminteger sepcifying the maximum number of times stored.