Nios® V Processor Software Developer Handbook

ID 743810
Date 10/02/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

13.1.1.65. 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

Sets the current time and timezone. 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.