CosTime_TIO(3)

πŸ“¦
version 5.2.2 Β· 2 versions
, in fedora 43, fedora 44

πŸ’– CosTime_TIO β€” bestie edition πŸ’–

okay so this is CosTime_TIO(3), an Erlang module definition page, and it's literally the module that implements the OMG CosTime::TIO interface. yes we're doing CORBA time stuff today. slay. πŸ•βœ¨


🌸 NAME 🌸

CosTime_TIO β€” this module implements the OMG CosTime::TIO interface. that's it, that's the whole vibe. πŸ‘‘


πŸŽ€ DESCRIPTION πŸŽ€

so like, if you wanna get access to the record definitions for the structures (and bestie, you DO), you're gonna do this:

-include_lib("cosTime/include/*.hrl").

that's the line. put it in your file. thank me later. πŸ’…


✨ EXPORTS ✨

πŸ¦‹ '_get_time_interval'(TIO) -> TimeInterval

Types:

TIO = #objref
TimeInterval = #'TimeBase_IntervalT{lower_bound, upper_bound}
lower_bound = upper_bound = ulonglong

this operation hands you back the interval that's associated with the target object. that's it. it's giving "just tell me the interval". lowkey the most chill function here. 🫢


πŸ’œ spans(TIO, UTO) -> Reply

Types:

TIO = UTO = OtherTIO = #objref
Reply = {OverlapType, OtherTIO}
OverlapType = 'OTContainer' | 'OTContained' | 'OTOverlap' | 'OTNoOverlap'

so this one returns an OverlapType based on how the interval in the target object and the timerange represented by the UTO object overlap. it's a whole vibe check between two time intervals ngl. ⏳

here's the tea on the out parameter:

  • if the OverlapType is 'OTNoOverlap', the out parameter represents the gap between the two intervals.
  • if the OverlapType is one of the others, the out parameter represents the overlap interval.

and the definitions of the OverlapTypes are, in order:

  • 'OTContainer' β€” target object's lower and upper limits are, respectively, less or equal to and greater or equal to the given object's. (so the target is wrapping around it. main character energy, honestly.)
  • 'OTContained' β€” target object's lower and upper limits are, respectively, greater or equal to and less or equal to the given object's. (target's the one getting wrapped. we've all been there.)
  • 'OTOverlap' β€” target object's interval overlaps the given object's. (they're both in it together, periodt.)
  • 'OTNoOverlap' β€” target object's interval does not overlap the given object's. (it's giving avoidant attachment. πŸ’€)

🌈 overlaps(TIO, OtherTIO) -> Reply

Types:

TIO = OtherTIO = AnotherTIO = #objref
Reply = {OverlapType, AnotherTIO}
OverlapType = 'OTContainer' | 'OTContained' | 'OTOverlap' | 'OTNoOverlap'

this operation returns an OverlapType depending on how the interval in the target object and the timerange represented by the TIO object overlap. and the OverlapTypes? they're described under spans/2 bestie, go read that one. i'm not typing it twice. 😭


⭐ time(TIO) -> UTO

Types:

TIO = UTO = #objref

this operation returns a UTO where the interval equals the time interval in the target object, and the time value is the midpoint of the interval. it's literally the "meet me in the middle" of time functions. iconic. πŸŽ€


ngl, these are all #objref-flavoured CORBA object references, so make sure your include line from up top is in there or nothing's gonna compile. no cap.

that's the whole page, you ate it, no crumbs left. 🫢✨

signed off with love by Ericsson AB β€” this is cosTime version 5.2.2, and the page itself is CosTime_TIO(3). mwah. πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from