[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [Time](https://evolu.dev/docs/api-reference/common/Time) › Time

Defined in: [packages/common/src/Time.ts:50](https://github.com/evoluhq/evolu/blob/4eedb2272841bdeb2d7c3387784ba157d2f33f1c/packages/common/src/Time.ts#L50)

Time and timer operations.

## Extended by

- [`TestTime`](https://evolu.dev/docs/api-reference/common/Time/interfaces/TestTime)
- [`NodejsTime`](https://evolu.dev/docs/api-reference/nodejs/interfaces/NodejsTime)

## Properties

<a id="cleartimeout"></a>

### clearTimeout

```ts
readonly clearTimeout: (id: TimeoutId) => void;
```

Defined in: [packages/common/src/Time.ts:84](https://github.com/evoluhq/evolu/blob/4eedb2272841bdeb2d7c3387784ba157d2f33f1c/packages/common/src/Time.ts#L84)

Cancels a timeout scheduled with this instance's [Time.setTimeout](https://evolu.dev/docs/api-reference/common/Time/interfaces/Time#settimeout).

Throws if the timeout was scheduled by another [Time](https://evolu.dev/docs/api-reference/common/Time/interfaces/Time) instance.

---

<a id="now"></a>

### now

```ts
readonly now: {
  (): number & Brand<"NonNaN"> & Brand<"Finite"> & Brand<"Int"> & Brand<"NonNegative"> & Brand<"LessThan281474976710655"> & Brand<"Millis">;
  (type: "DateIso"): string & Brand<"DateIso">;
};
```

Defined in: [packages/common/src/Time.ts:51](https://github.com/evoluhq/evolu/blob/4eedb2272841bdeb2d7c3387784ba157d2f33f1c/packages/common/src/Time.ts#L51)

#### Call Signature

```ts
(): number & Brand<"NonNaN"> & Brand<"Finite"> & Brand<"Int"> & Brand<"NonNegative"> & Brand<"LessThan281474976710655"> & Brand<"Millis">;
```

Returns current time as Unix epoch milliseconds.

#### Call Signature

```ts
(type: "DateIso"): string & Brand<"DateIso">;
```

Returns current time as an ISO 8601 UTC string.

---

<a id="performance"></a>

### performance

```ts
readonly performance: {
  now: () => PerformanceTime;
  timeOrigin: PerformanceTimeOrigin;
};
```

Defined in: [packages/common/src/Time.ts:59](https://github.com/evoluhq/evolu/blob/4eedb2272841bdeb2d7c3387784ba157d2f33f1c/packages/common/src/Time.ts#L59)

| Name         | Type                                                                                              | Description                                                                                                                                                                                                                                                                                                                                                                                                                                | Defined in                                                                                                                                       |
| ------------ | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `now()`      | () => [`PerformanceTime`](https://evolu.dev/docs/api-reference/common/Time/type-aliases/PerformanceTime)       | Returns a high-resolution timestamp in milliseconds relative to `performance.timeOrigin`. Unlike [Time.now](https://evolu.dev/docs/api-reference/common/Time/interfaces/Time#now), this value is not Unix epoch time and is unaffected by system clock adjustments. Like Node.js `process.hrtime.bigint()`, it is suitable for measuring elapsed time, but it uses the Web Performance API's number representation rather than nanoseconds as a bigint. | [packages/common/src/Time.ts:73](https://github.com/evoluhq/evolu/blob/4eedb2272841bdeb2d7c3387784ba157d2f33f1c/packages/common/src/Time.ts#L73) |
| `timeOrigin` | [`PerformanceTimeOrigin`](https://evolu.dev/docs/api-reference/common/Time/type-aliases/PerformanceTimeOrigin) | Unix epoch timestamp used as the origin for `performance.now()`.                                                                                                                                                                                                                                                                                                                                                                           | [packages/common/src/Time.ts:61](https://github.com/evoluhq/evolu/blob/4eedb2272841bdeb2d7c3387784ba157d2f33f1c/packages/common/src/Time.ts#L61) |

---

<a id="settimeout"></a>

### setTimeout

```ts
readonly setTimeout: (fn: () => void, delay: PositiveDuration) => TimeoutId;
```

Defined in: [packages/common/src/Time.ts:77](https://github.com/evoluhq/evolu/blob/4eedb2272841bdeb2d7c3387784ba157d2f33f1c/packages/common/src/Time.ts#L77)

Schedules a callback after the specified positive delay.