Class

NumCosmoMathTimer

Description [src]

final class NumCosmoMath.Timer : GObject.Object
{
  /* No available fields */
}

A timer with ETA support.

This object has several functions to track time, with the availability to be devided in several tasks. Also it provides two different formats: the default is time in seconds but also have date plus time. All with estimated time of accomplishment (ETA) support.

Ancestors

Constructors

ncm_timer_new

This function creates a new NcmTimer.

Functions

ncm_timer_clear

Decreases the reference count of nt by one and sets nt to NULL.

Instance methods

ncm_timer_continue

This function continues nt timer. nt must not have a task running.

ncm_timer_elapsed

If nt timer has been started but not stopped, obtains the time since the timer was started. If timer has been stopped, obtains the elapsed time between the time it was started and the time it was stopped. The return value is the number of seconds elapsed, including any fractional part. This function applies g_timer_elapsed() from Glib.

ncm_timer_elapsed_dhms

The this function returns the same information as above, but now the format is in days, hours, minutes and seconds. Those information are passed by the variables elap_day, elap_hour, elap_min and elap_sec, respectively.

ncm_timer_elapsed_dhms_str

Similar as the function above, but now the resulted time elapsed is returned in a string format.

ncm_timer_elapsed_since_last_log

This function returns the elapsed time since the last log.

ncm_timer_free

Decreases the reference count of nt by one.

ncm_timer_ref

Increases the reference count of nt by one.

ncm_timer_set_name

This functions set the named name to the nt NcmTimer.

ncm_timer_start

This function starts nt timer. nt must not have a task running.

ncm_timer_stop

This function stop nt timer. nt must not have a task running.

ncm_timer_task_accumulate

This function takes a task already created and divids it in nitens. The number of nitens must not exceed the length of the original task.

ncm_timer_task_add_tasks

This function adds ptasks to nt. The nt task length must be greater than 0.

ncm_timer_task_completed

This function returns the number of tasks already completed. The nt task length must be greater than 0.

ncm_timer_task_continue

This function resumes a nt task. The nt task length must be greater than 0.

ncm_timer_task_cur_datetime_str

This function returns a string with the current time of the nt task in date plus time format.

ncm_timer_task_elapsed_str

This function returns a string wiht the time needed to complete the tasks until the program reaches it. The nt task length must be greater than 0.

ncm_timer_task_end

This function ends nt task. The nt task length must be greater than 0.

ncm_timer_task_end_datetime_str

This function returns a string with the end time of the nt task in date plus time format.

ncm_timer_task_estimate_by_time

This function estimate how many task points would take sec seconds.

ncm_timer_task_has_ended

This function verifies if nt task has ended. The nt task length must be greater than 0.

ncm_timer_task_increment

This function increment nt task by one. The final task ID must be greater than the task length defined by ncm_timer_task_start ().

ncm_timer_task_is_running

This functions verify if nt has a task already running.

ncm_timer_task_log_cur_datetime

This function log the current time of the nts tasks in date plus time format.

ncm_timer_task_log_elapsed

This function log the time elapsed through all nts tasks.

ncm_timer_task_log_end_datetime

This function log the end time of the nts tasks in date plus time format.

ncm_timer_task_log_mean_time

This function log the mean time elapsed of each of the nt tasks.

ncm_timer_task_log_start_datetime

This function log the start time of the nts tasks in date plus time format.

ncm_timer_task_log_time_left

This function log the time left of the nts remaining tasks.

ncm_timer_task_mean_time

This function returns the mean time between all nt task.

ncm_timer_task_mean_time_str

This function returns astring with the average time to go through each task.

ncm_timer_task_pause

This function pauses a nt task. The nt task length must be greater than 0.

ncm_timer_task_start

This function starts a task at nt with lenght task_len. nt must not have a task already assigned to it. task_len must be bigger than 0, task_len>0.

ncm_timer_task_start_datetime_str

This function returns a string wiht the start time of the nt task in date plus time format.

ncm_timer_task_time_left

This function calculates the time for the remaining tasks of nt.

ncm_timer_task_time_left_str

This function returns a string with the time left to execute the remaining tasks.

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Properties

NumCosmoMath.Timer:name

The timer’s name.

NumCosmoMath.Timer:task-len

The length of the current task.

NumCosmoMath.Timer:task-pos

The Position of the current task, varying from [0, NcmTimer:task-len - 1].

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.

Class structure

struct NumCosmoMathTimerClass {
  GObjectClass parent_class;
  
}

No description available.

Class members
parent_class: GObjectClass

No description available.