<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Format](./bitburner.format.md) &gt; [time](./bitburner.format.time.md)

## Format.time() method

Format time to a readable string.

**Signature:**

```typescript
time(milliseconds: number, milliPrecision?: boolean): string;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  milliseconds | number | Number of millisecond to format. |
|  milliPrecision | boolean | _(Optional)_ Format time with subsecond precision. Defaults to false. |

**Returns:**

string

The formatted time.

## Remarks

RAM cost: 0 GB

