6#include "../core_export.h"
8#include "../time_span.h"
132 template <
typename callback_t>
134 template <
typename callback_t>
136 template <
typename callback_t>
137 timer(callback_t callback,
int64 due_time,
int64 period) : timer(timer_callback {callback}, due_time, period) {}
138 template <
typename callback_t>
139 timer(callback_t callback,
const time_span& due_time,
const time_span& period) : timer(timer_callback {callback}, due_time, period) {}
140 template <
typename callback_t>
141 timer(callback_t callback, uint32 due_time, uint32 period) : timer(
timer_callback {callback}, due_time, period) {}
142 template <
typename callback_t>
143 timer(callback_t callback, std::any state, int32 due_time, int32 period) : timer(
timer_callback {callback}, due_time, period) {}
144 template <
typename callback_t>
145 timer(callback_t callback, std::any state, int64 due_time, int64 period) : timer(
timer_callback {callback}, due_time, period) {}
146 template <
typename callback_t>
147 timer(callback_t callback, std::any state,
const time_span& due_time,
const time_span& period) : timer(
timer_callback {callback}, due_time, period) {}
148 template <
typename callback_t>
149 timer(callback_t callback, std::any state, uint32 due_time, uint32 period) : timer(
timer_callback {callback}, due_time, period) {}
151 timer(
const timer& timer);
152 timer& operator=(
const timer& timer);
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.h:42
void change(int64 due_time, int64 period)
changes the start time and the interval between method invocations for a timer, using 64-bit signed i...
timer(const timer_callback &callback, int32 due_time, int32 period)
Initializes a new instance of the timer class, using a 32-bit signed integer to specify the time inte...
timer(const timer_callback &callback, int64 due_time, int64 period)
Initializes a new instance of the timer class, using a 64-bit signed integer to specify the time inte...
void change(int32 due_time, int32 period)
changes the start time and the interval between method invocations for a timer, using 32-bit signed i...
timer(const timer_callback &callback, std::any state, uint32 due_time, uint32 period)
Initializes a new instance of the timer class, using a 32-bit unsigned integer to specify the time in...
void change(uint32 due_time, uint32 period)
changes the start time and the interval between method invocations for a timer, using 32-bit unsigned...
timer(const timer_callback &callback, std::any state, int64 due_time, int64 period)
Initializes a new instance of the timer class, using a 64-bit signed integer to specify the time inte...
timer(const timer_callback &callback, std::any state, const time_span &due_time, const time_span &period)
Initializes a new instance of the timer class, using a TimaSpan to specify the time interval.
timer(const timer_callback &callback, uint32 due_time, uint32 period)
Initializes a new instance of the timer class, using a 32-bit unsigned integer to specify the time in...
void change(const time_span &due_time, const time_span &period)
changes the start time and the interval between method invocations for a timer, using time_span value...
timer(const timer_callback &callback, std::any state, int32 due_time, int32 period)
Initializes a new instance of the timer class, using a 32-bit signed integer to specify the time inte...
timer(const timer_callback &callback, const time_span &due_time, const time_span &period)
Initializes a new instance of the timer class, using a TimaSpan to specify the time interval.
timer(const timer_callback &callback)
Initializes a new instance of the timer class with an infinite period and an infinite due time,...
void close()
Releases all resources used by the current instance of xtd::threading::timer.
Provides a mechanism for executing a method on a thread pool thread at specified intervals....
Definition timer.h:49
#define core_export_
Define shared library export.
Definition core_export.h:13
int32_t int32
Represents a 32-bit signed integer.
Definition int32.h:23
int64_t int64
Represents a 64-bit signed integer.
Definition int64.h:23
uint32_t uint32
Represents a 32-bit unsigned integer.
Definition uint32.h:23
std::shared_ptr< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.h:25
action< std::any > timer_callback
Represents the method that handles calls from a xtd::threading::timer.
Definition timer_callback.h:28
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Represents a time interval.
Definition time_span.h:29
Contains xtd::threading::timer_callback exception.