# micros

## 函数原型

```cpp
unsigned long micros(void);
```

## 作用

获取 Arduino 通电后或复位后到现在的时间，单位微秒

## 返回值

* `unsigned long` 无符号整型

  Arduino 通电后或复位后到现在的时间，单位**微秒**

## 示例

```cpp
void setup() {
    delay(500);

    int time = micros();
    // time 约等于 500,000
}

coid loop() {
    return;
}
```


---

# 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://arduino.doc.skyone.host/core/time/micros.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.
