# OS

### Methods <a href="#methods" id="methods"></a>

#### `os.args()` <a href="#osargs" id="osargs"></a>

Returns a list of command line arguments passed to a Ghost script. The first element `[0]` is the script name.

```go
os.args()
```

#### `os.clock()` <a href="#osclock" id="osclock"></a>

Returns the number of nanoseconds elapsed since January 1, 1970 UTC.

January 1st, 1970 at 00:00:00 UTC is referred to as the Unix epoch. Early Unix engineers picked that date arbitrarily because they needed to set a uniform date for the start of time, and New Year's Day, 1970, seemed most convenient.

```go
os.clock()

// expected value: 1643344902998773000
```

#### `os.exit()` <a href="#osexit" id="osexit"></a>

Causes the current program to exit with the given status code and optional message. Conventionally, code zero indicates success, non-zero an error. The program terminates immediately.

For portability, the status code should be in the range `[0, 125]`.

```go
os.exit(0, "Process completed successfully")

// expected outout: Process completed successfully
```

### Properties <a href="#properties" id="properties"></a>

#### `os.name` <a href="#osname" id="osname"></a>

Returns the name of the current operating system:

* `darwin` (macos)
* `linux`
* `windows`

```go
os.name

// expected value: darwin
```


---

# Agent Instructions: 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:

```
GET https://zaidlang.gitbook.io/z/standard-library/os.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
