---
name: "SDL_NS_TO_SECONDS"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_NS_TO_SECONDS"
---

# SDL\_NS\_TO\_SECONDS(3)

Convert nanoseconds to seconds.

## NAME

SDL\_NS\_TO\_SECONDS - Convert nanoseconds to seconds.

## HEADER FILE

Defined in SDL3/SDL\_timer.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**#define SDL\_NS\_TO\_SECONDS(NS)   ((NS) / SDL\_NS\_PER\_SECOND)**

## DESCRIPTION

This performs a division, so the results can be dramatically different if **NS** is an integer or floating point value.

## RETURN VALUE

Returns NS, expressed in seconds.

## THREAD SAFETY

It is safe to call this macro from any thread.

## AVAILABILITY

This macro is available since SDL 3.2.0.
