<!-- 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

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

milliseconds


</td><td>

number


</td><td>

Number of millisecond to format.


</td></tr>
<tr><td>

milliPrecision


</td><td>

boolean


</td><td>

_(Optional)_ Format time with subsecond precision. Defaults to false.


</td></tr>
</tbody></table>

**Returns:**

string

The formatted time.

## Remarks

RAM cost: 0 GB

