---
name: "ktime_to_timespec_cond"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/ktime_to_timespec_cond"
---

# ktime\_to\_timespec\_cond(9)

convert a ktime\_t variable to timespec format only if the variable contains data

## NAME

ktime\_to\_timespec\_cond - convert a ktime\_t variable to timespec format only if the variable contains data

## SYNOPSIS

**bool ktime\_to\_timespec\_cond(const ktime\_t** *kt***, struct timespec \*** *ts***);**

## ARGUMENTS

*kt*

the ktime\_t variable to convert

*ts*

the timespec variable to store the result in

## RETURN

**true** if there was a successful conversion, **false** if kt was 0.

## COPYRIGHT
