BEAST/BSE - Better Audio System and Sound Engine  0.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
sfitime.hh
Go to the documentation of this file.
1  // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
2 #ifndef __SFI_TIME_H__
3 #define __SFI_TIME_H__
4 
5 #include <sfi/sfivalues.hh>
6 
7 G_BEGIN_DECLS
8 
9 /* --- time (unix micro seconds) --- */
10 #define SFI_USEC_FACTOR ((SfiTime) 1000000) /* 64bit wide */
11 #define SFI_MIN_TIME (631152000 * SFI_USEC_FACTOR) /* 1990-01-01 00:00:00 UTC */
12 #define SFI_MAX_TIME (2147483647 * SFI_USEC_FACTOR) /* 2038-01-19 03:14:07 UTC */
13 
14 
15 /* --- functions --- */
16 SfiTime sfi_time_system (void); /* utc */
17 SfiTime sfi_time_to_utc (SfiTime ustime);
18 SfiTime sfi_time_from_utc (SfiTime ustime);
19 gchar* sfi_time_to_string (SfiTime ustime);
20 gchar* sfi_time_to_nice_string (SfiTime ustime,
21  const gchar *elements);
22 SfiTime sfi_time_from_string (const gchar *time_string);
23 SfiTime sfi_time_from_string_err (const gchar *time_string,
24  gchar **error_p);
25 
26 
27 /* --- internal --- */
28 void _sfi_init_time (void);
29 
30 
31 G_END_DECLS
32 
33 #endif /* __SFI_TIME_H__ */
34 
35 /* vim:set ts=8 sts=2 sw=2: */
SfiTime sfi_time_from_string_err(const gchar *time_string, gchar **error_p)
Definition: sfitime.cc:223
gchar * sfi_time_to_nice_string(SfiTime ustime, const gchar *elements)
Definition: sfitime.cc:167
gchar * sfi_time_to_string(SfiTime ustime)
Definition: sfitime.cc:130
SfiTime sfi_time_from_utc(SfiTime ustime)
Definition: sfitime.cc:116
SfiTime sfi_time_to_utc(SfiTime ustime)
Definition: sfitime.cc:102
SfiTime sfi_time_system(void)
Definition: sfitime.cc:81
SfiTime sfi_time_from_string(const gchar *time_string)
Definition: sfitime.cc:207