Nios II Classic Software Developer’s Handbook

ID 683282
Date 5/14/2015
Public
Document Table of Contents

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