Class
NumCosmoMathTimer
Description [src]
final class NumCosmoMath.Timer : GObject.Object
{
/* No available fields */
}
Wall-clock timer with progress tracking for a task of a known number of items.
A task is started with ncm_timer_task_start() and advanced with
ncm_timer_task_increment() or ncm_timer_task_accumulate(). The time per item is
accumulated to give the mean time per item, the time left and the estimated end
time. Functions returning a string return a buffer owned by the timer, which the
next call to any of them overwrites.
Instance methods
ncm_timer_elapsed_since_last_log
The ncm_timer_task_log functions record the time of the last completed item as the time of the log.
ncm_timer_task_accumulate
Marks nitens items as completed, recording the time since the previous update
divided by nitens as the time of each. Aborts if no task is running or if this
passes the end of the task.
ncm_timer_task_continue
Resumes the timer after ncm_timer_task_pause(). Aborts if no task is running.
ncm_timer_task_elapsed_str
Formats the number of completed items and the elapsed time. Aborts if no task is running.
ncm_timer_task_end_datetime_str
Formats the local date and time at which the task is estimated to end, with the standard error of the time left. A value is “unknown” until it is defined: the mean after the first completed item, the standard error after the second update.
ncm_timer_task_increment
Marks one item as completed, recording the time since the previous item. Aborts if no task is running or if the task is already complete.
ncm_timer_task_mean_time_str
Formats the mean time per item with its standard error. Aborts if no task is running. A value is “unknown” until it is defined: the mean after the first completed item, the standard error after the second update.
ncm_timer_task_start
Starts a task of task_len items and restarts the timer. Aborts if a task is
running or if task_len is zero.
ncm_timer_task_start_datetime_str
Formats the local date and time now minus ncm_timer_elapsed(), which is the start of the timer if it was never stopped.
ncm_timer_task_time_left_str
Formats ncm_timer_task_time_left() with its standard error. Aborts if no task is
running.
A value is “unknown” until it is defined: the mean after the first completed item,
the standard error after the second update.
Signals
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.