public interface TIM
Modifier and Type | Method and Description |
---|---|
Date |
create_date(int year,
int month,
int day,
int hour,
int minute,
int second)
Create a new
Date object from
the input parameters. |
TimeStamp |
current_clock()
Get the current system time.
|
Date |
current_date()
Get the current date.
|
int |
get_day(Date date)
Get the day of the month from a date object.
|
int |
get_hour(Date date)
Get hour of the day from a date object.
|
int |
get_minute(Date date)
Get minute of the hour from a date object.
|
int |
get_month(Date date)
Get the month of the year from a date object.
|
int |
get_second(Date date)
Get second of the minute from a date object.
|
int |
get_year(Date date)
Get year from a date object.
|
boolean |
timer_add_time(int microseconds,
TimerHandle timer_inst_ref)
Add time to a running timer.
|
boolean |
timer_cancel(TimerHandle timer_inst_ref)
Cancel a running timer.
|
int |
timer_remaining_time(TimerHandle timer_inst_ref)
Get the remaining time of a running timer in microseconds.
|
boolean |
timer_reset_time(int microseconds,
TimerHandle timer_inst_ref)
Reset the timer and set a new duration from the current system time.
|
TimerHandle |
timer_start_recurring(EventHandle event_inst,
int microseconds)
Start a new recurring timer to wake in
microseconds microseconds
from the current system time. |
TimerHandle |
timer_start(EventHandle event_inst,
int microseconds)
Start a new timer to wake in
microseconds microseconds from the
current system time. |
Date create_date(int year, int month, int day, int hour, int minute, int second)
Date
object from
the input parameters.year
- the year A.D.month
- the month of the yearday
- the day of the monthhour
- the hour of the dayminute
- the minute of the hoursecond
- the second of the minuteDate
object from
the input parametersTimeStamp current_clock()
Date current_date()
int get_day(Date date)
date
- the input dateint get_month(Date date)
date
- the input dateint get_year(Date date)
date
- the input dateint get_hour(Date date)
date
- the input dateint get_minute(Date date)
date
- the input dateint get_second(Date date)
date
- the input dateboolean timer_add_time(int microseconds, TimerHandle timer_inst_ref)
microseconds
- the time to add in microsecondstimer_inst_ref
- the timer handle to add time toboolean timer_cancel(TimerHandle timer_inst_ref)
timer_inst_ref
- the timer handle to cancelint timer_remaining_time(TimerHandle timer_inst_ref)
timer_inst_ref
- the timer handle to inspectboolean timer_reset_time(int microseconds, TimerHandle timer_inst_ref)
microseconds
- the new duration from the current system time to set
in microsecondstimer_inst_ref
- the timer handle to resetTimerHandle timer_start(EventHandle event_inst, int microseconds)
microseconds
microseconds from the
current system time. The architecture does not guarantee the timer will
wake in exactly microseconds
microseconds, however it does
guarantee that it will be at least that long. When the timer wakes, the
event_inst
will be added to the system event queue.event_inst
- the event to generate when the timer wakesmicroseconds
- the duration from the current system time to set in
microsecondsTimerHandle timer_start_recurring(EventHandle event_inst, int microseconds)
microseconds
microseconds
from the current system time. The architecture does not guarantee the
timer will wake in exactly microseconds
microseconds, however it
does guarantee that it will be at least that long. When the timer wakes,
the event_inst
will be added to the system event queue. The timer
will then be reset to wake again at microseconds
after the system
time when the timer event was last generated.event_inst
- the event to generate when the timer wakesmicroseconds
- the duration from the current system time to set in
microsecondsCopyright © 2020. All rights reserved.