Searched refs:period (Results 1 - 3 of 3) sorted by relevance
/commonlibrary/rust/ylong_runtime/ylong_runtime/src/time/ |
H A D | timer.rs | 24 /// Creates new [`Timer`] that yields with interval of `period`. The first task 47 pub fn timer(period: Duration) -> Timer { in timer() 48 timer_at(Instant::now(), period) in timer() 51 /// Creates new [`Timer`] that yields with interval of `period`. 77 pub fn timer_at(start: Instant, period: Duration) -> Timer { in timer_at() 79 Timer { start, period } in timer_at() 82 /// Automatically executes closure every 'period' for 'repeat_time' times. 111 pub async fn periodic_schedule<T>(mut closure: T, repeat_time: Option<usize>, period: Duration) 115 let mut timer = timer(period); 133 period 164 pub fn period(&self) -> Duration { period() functions [all...] |
/commonlibrary/ets_utils/js_concurrent_module/taskpool/ |
H A D | taskpool.h | 65 static void TriggerTimer(napi_env env, Task* task, int32_t period);
69 static bool CheckPeriodicallyParams(napi_env env, napi_callback_info cbinfo, int32_t &period, uint32_t &priority,
|
H A D | taskpool.cpp | 666 int32_t period = 0;
in ExecutePeriodically() local 669 if (!CheckPeriodicallyParams(env, cbinfo, period, priority, periodicTask)) {
in ExecutePeriodically() 687 TriggerTimer(env, periodicTask, period);
in ExecutePeriodically() 691 void TaskPool::TriggerTimer(napi_env env, Task* task, int32_t period)
in TriggerTimer() argument 699 uv_timer_start(task->timer_, PeriodicTaskCallback, period, period);
in TriggerTimer() 760 bool TaskPool::CheckPeriodicallyParams(napi_env env, napi_callback_info cbinfo, int32_t &period,
in CheckPeriodicallyParams() argument 763 size_t argc = 3; // 3 : period, task, priority
in CheckPeriodicallyParams() 764 napi_value args[3]; // 3 : period, task, priority
in CheckPeriodicallyParams() 766 if (argc < 2 || argc > 3) { // 2 : period, tas in CheckPeriodicallyParams() [all...] |
Completed in 2 milliseconds