> For the complete documentation index, see [llms.txt](https://arduino.doc.skyone.host/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://arduino.doc.skyone.host/core/time/micros.md).

# micros

## 函数原型

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

## 作用

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

## 返回值

* `unsigned long` 无符号整型

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

## 示例

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

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

coid loop() {
    return;
}
```
