5.6.4 : Le fichier timer.cpp
Développons le timer.cpp :Incluons notre header :
1 |
#include "timer.h"
|
Implémentons notre chronomètre (il est extrèmement simple, mais la suite sera dans le fichier main.cpp) :
1 2 3 4 5 6 |
///Get the current time /** @return current time in nanosecond */ HiPeTime phoenix_getTime(){ return HiPeClock::now(); } |
Le fichier timer.cpp complet :
1 2 3 4 5 6 7 8 9 10 11 12 13 |
/*************************************** Auteur : Pierre Aubert Mail : pierre.aubert@lapp.in2p3.fr Licence : CeCILL-C ****************************************/ #include "timer.h" ///Get the current time /** @return current time in nanosecond */ HiPeTime phoenix_getTime(){ return HiPeClock::now(); } |
Le fichier timer.cpp est disponible ici.