Logo AND Algorithmique Numérique Distribuée

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