⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 timers.sgml

📁 GLib是GTK+和GNOME工程的基础底层核心程序库
💻 SGML
字号:
<!-- ##### SECTION Title ##### -->Timers<!-- ##### SECTION Short_Description ##### -->keep track of elapsed time.<!-- ##### SECTION Long_Description ##### --><para>#GTimer records a start time, and counts microseconds elapsed since that time.This is done somewhat differently on different platforms, and can be tricky toget exactly right, so #GTimer provides a portable/convenient interface.</para><!-- ##### SECTION See_Also ##### --><para></para><!-- ##### STRUCT GTimer ##### --><para>Opaque datatype that records a start time. </para><!-- ##### FUNCTION g_timer_new ##### --><para>Creates a new timer, and starts timing (i.e. g_timer_start() is implicitlycalled for you).</para>@Returns: a new #GTimer.<!-- ##### FUNCTION g_timer_start ##### --><para>Marks a start time, so that future calls to g_timer_elapsed() will report thetime since g_timer_start() was called. g_timer_new() automatically marks thestart time, so no need to call g_timer_start() immediately after creating thetimer.</para>@timer: a #GTimer.<!-- ##### FUNCTION g_timer_stop ##### --><para>Marks an end time, so calls to g_timer_elapsed() will return the differencebetween this end time and the start time.</para>@timer: a #GTimer.<!-- ##### FUNCTION g_timer_elapsed ##### --><para>If @timer has been started but not stopped, obtains the time since the timer wasstarted. If @timer has been stopped, obtains the elapsed time between the timeit was started and the time it was stopped. The return value is the number ofseconds elapsed, and the @microseconds argument allows you to get the number ofmicroseconds.</para>@timer: a #GTimer.@microseconds: return location for microseconds elapsed, or %NULL.@Returns: seconds elapsed.<!-- ##### FUNCTION g_timer_reset ##### --><para>This function is useless; it's fine to call g_timer_start() on analready-started timer to reset the start time, so g_timer_reset() serves nopurpose.</para>@timer: a #GTimer.<!-- ##### FUNCTION g_timer_destroy ##### --><para>Destroys a timer, freeing associated resources.</para>@timer: a #GTimer to destroy.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -