# 현재 시간 가져오기

### 코드

{% code title="연도\~초까지만 가져올 때" %}

```
현재 시간 가져오기 or 지금 시간 가져오기
```

{% endcode %}

{% code title="연도\~밀리초까지 가져올 때" %}

```
현재 밀리초 가져오기 or 지금 밀리초 가져오기
```

{% endcode %}

***

### 설명

<mark style="color:purple;">`현재/지금 시간 가져오기`</mark>는 현재 시간을 가져오는 함수로, 타임스탬프 값에서 초 단위까지 숫자형으로 가져오는 함수예요.

<mark style="color:purple;">`현재/지금 밀리초 가져오기`</mark>는 현재 시간을 밀리초까지 가져오는 함수로, 타임스탬프를 숫자형으로 가져오는 함수예요.

타임스탬프는 1970년 1월 1일 0시 0분 0초(UTC)를 기준으로 지난 시간을 초 또는 밀리초 단위로 나타낸 숫자예요.

***

### 주의사항

* 딱히 없습니다!

***

### 파이썬 대응 코드

```
import time
time.time()
```

***

### 예시

{% code title="예시 코드" %}

```
현재 시간 가져오기 보여주기
현재 밀리초 가져오기 보여주기
```

{% endcode %}

{% code title="예시 코드의 출력" %}

```
1744624881
1744624881447
```

{% endcode %}

***

### 검색 키워드

시각, 날짜, 연도, 년도


---

# 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://codebook.horang.it/readme/021.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.
