Nios® II Software Developer Handbook

ID 683525
Date 8/28/2023
Public
Document Table of Contents

15.1.67. settimeofday()

Prototype

int settimeofday (const struct timeval *t, 


const struct timezone *tz)

Commonly Called By

C/C++ programs

Thread-safe

No.

Available from ISR

Yes.

Include

<sys/time.h>

Description

If the settimeofday() function is called concurrently with a call to gettimeofday(), the value returned by gettimeofday() is unreliable.

Return

The return value is zero on success. If no system clock is available, the return value is -1, and errno is set to ENOSYS.