CosTime_TimeService(3)
π CosTime_TimeService β the Erlang module definition, bestie edition π
okay so real quick, this page lives in cosTime version 5.2.2 (it's an Erlang Module Definition, iykyk) and it's all about the CosTime::TimeService interface. let's get into it π«Ά
β¨ NAME β¨
CosTime_TimeService β this module implements the OMG CosTime::TimeService interface. that's the whole vibe. π
πΈ DESCRIPTION πΈ
sooo to actually get access to the record definitions for the structures (you're gonna want those, trust), use this:
-include_lib("cosTime/include/*.hrl").
that's it, that's the whole description. short and iconic. π
π EXPORTS π
okay bestie, here's where the main character energy lives. four operations, all of them serving π
universal_time(TimeService) -> Reply
Types:
TimeService = #objref
Reply = UTO | {'EXCEPTION", #'TimerService_TimeUnavailable'{}}
UTO = #objref
This operation returns the current time and the Inaccuracy given when starting this application in a UTO. The time base is 15 october 1582 00:00. Comparing two time objects which use different time base is, by obvious reasons, pointless. like literally don't even bother, it's giving chaos π
new_universal_time(TimeService, Time, Inaccuracy, Tdf) -> UTO
Types:
TimeService = UTO = #objref
Time = Inaccuracy = ulonglong()
Tdf = short()
This operation creates a new UTO object representing the time parameters given. This is the only way to create a UTO with an arbitrary time from its components. This is useful when using the Timer Event Service. no cap, this is the one π₯
uto_from_utc(TimeService, Utc) -> UTO
Types:
TimeService = UTO = #objref
Utc = #'TimeBase_UtcT'{time, inacclo, inacchi, tdf}
time = ulonglong()
inacclo = ulong()
inacchi = ushort()
tdf = short()
This operation is used to create a UTO given a time in the Utc form. you hand it the Utc, it hands you a UTO, everyone wins π¦
new_interval(TimeService, Lower, Upper) -> TIO
Types:
TimeService = TIO = #objref
Lower = Upper = ulonglong()
This operation is used to create a new TIO object, representing the input parameters.
β οΈ ifLoweris greater thanUpper,BAD_PARAMis raised. so likeβ¦ don't do that bestie, the interval does not want that energy π
and that's the whole page!! π this iconic little number was brought to you by Ericsson AB, part of cosTime 5.2.2 β go forth and timestamp responsibly, you absolute legend πβ¨πΈ
π¦ 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