> For the complete documentation index, see [llms.txt](https://docs.b2winsuite.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.b2winsuite.com/5.6/scripting/utilities/system.md).

# System

Learn to interact with system-related information.

The `System` class provides methods for interacting with system-related information. Such as current time, system environment, system user, path, etc.

### Methods

**`currentTimeMillis()`:**&#x20;

Returns the current time in milliseconds as a number.

```typescript
// Example: Get current time in milliseconds
var currentTimeMillis = System.currentTimeMillis();
return "Current time in milliseconds: " + currentTimeMillis;
```

**`nanoTime()`:**&#x20;

Returns the current value of the system's high-resolution time source in nanoseconds as a number.

```typescript
// Example 1: Get current time in nanoseconds
var nanoseconds = System.nanoTime();
return "Current time in nanoseconds: " + nanoseconds;
```

**`lineSeparator()`:**&#x20;

Returns the platform-specific line separator as a string.

```typescript
// Example: Get the system-dependent line separator
var lineSeparator = System.lineSeparator();
```

**`getenv()`:**&#x20;

Returns the system environment as a string.

```typescript
// Get the system user
var username = System.getenv("USERNAME");

// Get the system path
varpath = System.getenv("PATH");
```

Additional environment variables accessible through `getenv()` include:

* "USERPROFILE": Path to the current user's profile directory.
* "TEMP" and "TMP": Paths to the temporary directory.
* "USERNAME": The username of the currently logged-in user.
* "COMPUTERNAME": Name of the computer.
* "OS": Information about the operating system.
* "SYSTEMROOT" or "WINDIR": Paths to the Windows system directory.
* "APPDATA": Path to the directory where application-specific data for the current user is stored.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.b2winsuite.com/5.6/scripting/utilities/system.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
