interface · Browser and Node

# Clock

Where every component gets the time. Production uses SystemClock; tests use DemoClock.

`@toip-tools/trust-core` · [View source](https://github.com/yourbuddyconner/toip-tools/blob/main/packages/trust-core/src/clock.ts#L2)

Import:

```ts
import { type Clock } from "@toip-tools/trust-core";
```

## Declaration

interface:

```ts
interface Clock {
  now(): number;
  iso(): string;
  date(): Date;
}
```

## Methods

### `now`

Signature:

```ts
now(): number;
```

No parameters.

#### Returns

`number`

### `iso`

Signature:

```ts
iso(): string;
```

No parameters.

#### Returns

`string`

### `date`

Signature:

```ts
date(): Date;
```

No parameters.

#### Returns

`Date`

[Usage guide](https://toip.tools/toolkit/trust-core/#usage) · [Error handling](https://toip.tools/toolkit/trust-core/#errors) · [All exports](https://toip.tools/toolkit/trust-core/api/)

---

This is the Markdown version of https://toip.tools/toolkit/trust-core/api/Clock/. An index of the documentation for AI assistants is at https://toip.tools/llms.txt.
