Beast - Music Synthesizer and Composer  0.11.1+10.g2da35
sfitime.hh File Reference
#include <sfi/sfivalues.hh>
Include dependency graph for sfitime.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SFI_USEC_FACTOR
 
#define SFI_MIN_TIME
 
#define SFI_MAX_TIME
 

Functions

SfiTime sfi_time_system (void)
 
SfiTime sfi_time_to_utc (SfiTime ustime)
 
SfiTime sfi_time_from_utc (SfiTime ustime)
 
gchar * sfi_time_to_string (SfiTime ustime)
 
gchar * sfi_time_to_nice_string (SfiTime ustime, const gchar *elements)
 
SfiTime sfi_time_from_string (const gchar *time_string)
 
SfiTime sfi_time_from_string_err (const gchar *time_string, gchar **error_p)
 
void _sfi_init_time (void)
 

Function Documentation

SfiTime sfi_time_from_string ( const gchar *  time_string)
Parameters
time_stringstring containing human readable date and time
Returns
parsed time in micro seconds or 0 on error

Simple variant of sfi_time_from_string_err().

Here is the call graph for this function:

SfiTime sfi_time_from_string_err ( const gchar *  time_string,
gchar **  error_p 
)
Parameters
time_stringstring containing human readable date and time
error_plocation for newly allocated string containing conversion errors
Returns
parsed time in micro seconds, may be 0 on error

Parse date and time from a string of characters and indicate possible errors. Several attempts are made to reconstruct a valid date and time despite possible errors. However, if all attempts fail, the returned time is 0. The time returned is UTC, refer to sfi_time_from_utc() in order to retrieve the local standard time.

Referenced by sfi_time_from_string().

Here is the call graph for this function:

Here is the caller graph for this function:

SfiTime sfi_time_from_utc ( SfiTime  ustime)
Parameters
ustimeUTC relative time in micro seconds
Returns
local standard time in micro seconds

Convert the Coordinated Universal Time (UTC) ustime into local standard time. This function is MT-safe and may be called from any thread.

SfiTime sfi_time_system ( void  )
Returns
Current system time in micro seconds

Get the current system time in micro seconds. Subsequent calls to this function do not necessarily return greater values. In fact, a second call may return a value smaller than the first call under certain system conditions. The time returned is UTC, refer to sfi_time_from_utc() in order to retrieve the local standard time. This function is MT-safe and may be called from any thread.

Referenced by bse_engine_tick_stamp_from_systime().

Here is the call graph for this function:

Here is the caller graph for this function:

gchar* sfi_time_to_nice_string ( SfiTime  ustime,
const gchar *  elements 
)
Parameters
ustimetime in micro seconds
elementsstring identifying time elements
Returns
newly allocated string Retrieve the time ustime in human readable form. Within the rnage of date and time formats parsable by sfi_time_from_string(), the nicest display is selected according to the current locale and other user settings. By means of the elements argument, various elemtns of a full date string can be selected:
  • H - display hours
  • M - display minutes
  • S - display seconds
  • d - display day
  • m - display month
  • y - display year
The returned time string describes UTC time and thus contains no time zone or UTC offset information.

Here is the call graph for this function:

gchar* sfi_time_to_string ( SfiTime  ustime)
Parameters
ustimetime in micro seconds
Returns
newly allocated string

Retrieve the time ustime in human readable form. The returned time string describes UTC time and thus contains no time zone or UTC offset information.

Here is the call graph for this function:

SfiTime sfi_time_to_utc ( SfiTime  ustime)
Parameters
ustimelocal standard time in micro seconds
Returns
UTC relative time in micro seconds

Convert the local standard time ustime into Coordinated Universal Time (UTC). This function is MT-safe and may be called from any thread.