Player APIs (BrightScript & Ja...
...
Date and Time Objects
roTimeSpan
5 min
this object provides an interface to a simple timer for tracking the duration of activities it is useful for tracking how long an action has taken or whether a specified time has elapsed from a starting event the javascript equivalent is "date" iftimespan mark() sets the "mark" point to the current time the mark point is also automatically set to the current time when an rotimespan object is created totalmilliseconds() as integer returns the total number of milliseconds from the "mark" point to the current time totalseconds() as integer returns the total number of seconds from the "mark" point to the current time example is equivalent to getsecondstoiso8601date(a as string) as integer parses the iso8601 date (for example, 2008 11 29t14 54 02 171) and returns the number of seconds from now (not the "mark" point) until the specified date/time the date provided and the current time calculations are all done assuming utc the "z" timezone part of the iso8601 string is ignored parameters date string string the iso8601date to be parsed