cosTime(3)
π cosTime π
okay bestie, gather round, because we're doing cosTime β the main module of the cosTime application, from the Erlang module definition corner of the universe. this is your girl's girl of time services and she is serving π°οΈβ¨
β¨ NAME β¨
cosTime β the main module of the cosTime application. she's the one running the whole thing, no cap π
πΈ DESCRIPTION πΈ
so first things first, if you wanna get access to the record definitions for the structures, you do this:
-include_lib("cosTime/include/*.hrl").
that's the vibe, that's the move, don't skip it π
This module contains the functions for starting and stopping the application. like, start her up, shut her down, that's the whole mood.
Now, important lore alert π¨ β this application uses the time base 15 october 1582 00:00. If you go performing operations using other time bases, you will not get a correct result. like, it's giving wrong answers, and that's not the energy we're going for π so stay in your lane, bestie, use that time base.
The OMG CosTime specification defines the operation secure_universal_time. and here's the tea: as of today we cannot provide this functionality, considering the criteria demanded to fulfill the OMG specification. so don't come for us about it, we said what we said π
When you're using this application, the time and inaccuracy supplied by the user must be given in number of 100 nano seconds. yes, that specific. and the Time Displacement Factor is positive east of the meridian, while those to the west are negative. east side positive, west side negative, periodt π§β¨
This application uses calender:now_to_universal_time(Now) to create a UTC. Hence, the underlying OS must deliver a correct result when calling erlang:now(). like, if your OS is out here lying, we can't fix that for you bestie, that's between you and your kernel π
And when determining the inaccuracy of the system, the user should consider the way the time objects will be used. Communicating with other ORB's, add a substantial overhead and should be taken into consideration. so like, factor that in, don't be shocked when things get a lil spicy across the network π«Ά
π EXPORTS π
these are the functions, the whole squad, and they all get their moment π
β install_time() -> Return
Types:
Return = ok | {'EXIT', Reason}
This operation installs the cosTime Time Service part application. she's moving in, unpacking boxes, setting up her little corner β¨
β uninstall_time() -> Return
Types:
Return = ok | {'EXIT', Reason}
This operation uninstalls the cosTime Time Service part application. packing up, moving out, no drama π
β install_timerevent() -> Return
Types:
Return = ok | {'EXIT', Reason}
This operation installs the cosTime Timer Event Service part application. another one moving in π
Note: The Timer Event Service part requires Time Service part andcosEventor thecosNotificationapplication to be installed first. like, she needs her friends present, she does not arrive alone, understood? π
β uninstall_timerevent() -> Return
Types:
Return = ok | {'EXIT', Reason}
This operation uninstalls the cosTime Timer Event Service part application. bye babes π¦
β start() -> Return
Types:
Return = ok | {error, Reason}
This operation starts the cosTime application. we're up, we're live, main character energy activated π₯
β stop() -> Return
Types:
Return = ok | {error, Reason}
This operation stops the cosTime application. okay we're done here, everyone go home π
β start_time_service(Tdf, Inaccuracy) -> Return
Types:
Tdf = short()
Inaccuracy = ulonglong(), eq. #100 nano seconds
Return = ok | {'EXCEPTION', #'BAD_PARAM'{}}
This operation starts a Time Service server. and listen, bestie, please note that there may only be exactly one Time Service active at a time. one. singular. don't be out here starting a whole group chat of Time Services, that's not the assignment π€
The Inaccuracy parameter defines the inaccuracy the underlying OS will introduce. And remember to take into account latency when passing time object between nodes. like, the vibes take time to travel, factor it in π°οΈ
β stop_time_service(TimeService) -> ok
Types:
TimeService = #objref
This operation stops the Time Service object. night night π
β start_timerevent_service(TimeService) -> ok
Types:
TimeService = #objref
This operation starts a Timer Event Service server. And please note that there may only be exactly one Timer Event Service per node active at a time. per node, bestie, we said what we said π’
The supplied TimeServcie reference will be the object Timer Event Service contacts to get access to a new UTC. yes that spelling is exactly how it is in the original, we're keeping it character for character, we don't fix things around here, we honor them π
β stop_timerevent_service(TimerEventService) -> ok
Types:
TimerEventService = #objref
This operation stops the Timer Event Service object. and that's a wrap on the whole lineup, iconic behavior honestly π
and that's the whole page, bestie!! you made it, I'm so proud of you π₯Ήπ
signing off with the receipts: this is Ericsson AB's work, cosTime version 5.2.2, and it lives at cosTime(3) in the manual pages. slay, bye, go start exactly one Time Service π β¨π¦
π¦ 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