Nios® V Processor Software Developer Handbook

ID 743810
Date 4/01/2024
Public
Document Table of Contents

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