---
title: roTimeSpan
slug: develop/rotimespan
docTags: 
createdAt: 2025-03-11T07:07:17.200Z
---

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.&#x20;

Example

:::BlockQuote
x = timespan.TotalSeconds()
:::

is equivalent to

:::BlockQuote
x = Int(timespan.TotalMilliseconds() / 1000)
:::

### 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` <font color="#704ae0">String</font>: The ISO8601date to be parsed.




