COSTIMEREVENT_TIMEREVENTHANDLER(3erl)
β¨ NAME β¨
CosTimerEvent_TimerEventHandler β bestie, this module is the whole implementation of the OMG CosTimerEvent::TimerEventHandler interface. that's it, that's the name, iconic π
π¦ DESCRIPTION π¦
okay so before you can even look at the record definitions for the structures, you gotta pull them in like this:
-include_lib("cosTime/include/*.hrl").
that's the entry fee. no include, no records, no vibes. π
π EXPORTS π
πΈ '_get_status'(TimerEventHandler) -> Reply
Types:
TimerEventHandler = #objref
Reply = 'ESTimeSet' | 'ESTimeCleared' | 'ESTriggered' | 'ESFailedTrigger'
this op literally just hands you back the status of the target object. no notes. here's the tea on each possible reply:
'ESTimeSet'β the timer is set and it will trigger event(s). she's ready. π'ESTimeCleared'β either no time was ever set, or the timer got reset. nothing pending, bestie.'ESTriggered'β the event has already been sent. done. ate. β¨'ESFailedTrigger'β it tried to send the event and it failed. it's giving π energy fr fr.
heads up: if the target object is of type'TTPeriodic', then the status value'ESTriggered'is not valid. don't come for me, that's just how it is π«Ά
πΈ time_set(TimerEventHandler) -> Reply
Types:
TimerEventHandler = #objref
Reply = {boolean(), UTO}
UTO = #objref
this one returns true if the time has actually been set for an event that hasn't been triggered yet β and false if it hasn't. the outparameter is the current time value of the target object. so like, a boolean and a lil time receipt. obsessed. π
πΈ set_timer(TimerEventHandler, TimeType, TriggerTime) -> void()
Types:
TimerEventHandler = #objref
TimeType = 'TTAbsolute' | 'TTRelative' | 'TTPeriodic'
TriggerTime = UTO
UTO = #objref
this operation terminates any previously set trigger (bye bestie π) and sets a brand new trigger, specified by the TimeType and the UTO objects. and now the important part β the relationship between the UTO object and the TimeTypes:
'TTAbsolute'β theUTOobject must represent absolute time, i.e., the number of 100 nanoseconds passed since 15 october 1582 00:00. yes really, that specific. no cap. β'TTRelative'β theUTOobject must represent the span from now until whenever the event should be triggered, e.g., within30*10^7nanoseconds.'TTPeriodic'β same deal as'TTRelative', BUT this option will trigger an event periodically until the timer gets cancelled. she keeps going. main character energy, she does not stop π
πΈ cancel_timer(TimerEventHandler) -> boolean()
Types:
TimerEventHandler = #objref
this operation cancels the triggering of event(s), if possible. it returns true if an event is actually cancelled, and false otherwise. so like, sometimes she can, sometimes she can't, and she'll tell you which π
πΈ set_data(TimerEventHandler, EventData) -> ok
Types:
TimerEventHandler = #objref
EventData = #any
this operation changes the event data that gets sent when triggered. that's the whole thing. short, sweet, slays. π
and that's the whole page, bestie!! this was Ericsson AB, cosTime 5.2.2, and if you peek at the footer it says CosTimerEv...ventHandler(3) β the name got cut off but we know who she is π mwah, go set some timers, ily π§β¨
π¦ where this page comes from
- fedora 43: erlang-cosTime 1:5.2.2-1.fc43 Β· Apache-2.0
- fedora 44: erlang-cosTime 1:5.2.2-1.fc44 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms