3 /* gras/core.h - Unsorted part of the GRAS public interface */
5 /* Authors: Martin Quinson */
6 /* Copyright (C) 2003 the OURAGAN project. */
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. */
14 #include <stddef.h> /* offsetof() */
15 #include <sys/types.h> /* size_t */
19 /*! C++ users need love */
22 # define BEGIN_DECL extern "C" {
28 /*! C++ users need love */
36 /* End of cruft for C++ */
40 /* **************************************************************************
41 * Garbage collection support
42 * **************************************************************************/
43 typedef enum { free_after_use, free_never } e_gras_free_directive_t;
46 /* **************************************************************************
47 * Wrappers over OS functions
48 * **************************************************************************/
53 * Returns the fully-qualified name of the host machine, or NULL if the name
54 * cannot be determined. Always returns the same value, so multiple calls
58 gras_get_my_fqdn(void);
63 * Get the time in number of second since the Epoch.
64 * (00:00:00 UTC, January 1, 1970 in Real Life, and begining of simulation in SG)
66 double gras_time(void);
70 * @sec: number of seconds to sleep
71 * @usec: number of microseconds to sleep
73 * sleeps for the given amount of seconds plus the given amount of microseconds.
75 void gras_sleep(unsigned long sec, unsigned long usec);
79 #endif /* GRAS_CORE_H */