Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Move Virtu functions into the gras_os_ namespace
[simgrid.git] / src / gras / Virtu / sg_time.c
1 /* $Id$ */
2
3 /* time - time related syscal wrappers                                      */
4
5 /* Authors: Martin Quinson                                                  */
6 /* Copyright (C) 2003,2004 da GRAS posse.                                   */
7
8 /* This program is free software; you can redistribute it and/or modify it
9    under the terms of the license (GNU LGPL) which comes with this package. */
10
11 #include "Virtu/virtu_sg.h"
12
13 /**
14  * gras_time:
15  * @Returns: The current time
16  * 
17  * The epoch since when the time is given is not specified. It is thus only usefull to compute intervals
18  */
19 double gras_os_time() {
20   return MSG_getClock();
21 }
22
23 /**
24  * gras_sleep:
25  * @sec: amount of sec to sleep
26  * @usec: amount of micro second to sleep
27  * 
28  * Freeze the process for the specified amount of time
29  */
30 void gras_os_sleep(unsigned long sec,unsigned long usec) {
31   MSG_process_sleep((double)sec + ((double)usec)/1000000);
32 }