struct timeVal

T

Tim Quon

Hi

I have a function which needs a struct timeVal as timeout parameter.
How can I initialize this struct to a timeout of 3 seconds?

Thanks
Tim
 
J

Jens.Toerring

Tim Quon said:
I have a function which needs a struct timeVal as timeout parameter.
How can I initialize this struct to a timeout of 3 seconds?

Impossible to tell because you neither tell us how the "struct timeVal"
looks like nor where its layout is documented and what the members of
the structure (whatever they are) are good for.

<OT>
If you mean a "struct timeval", used e.g. in nonstandard function
like gettimeofday() then just set the tv_sec member to 3 and the
tv_usec member to 0.
</OT>
Regards, Jens
--
_ _____ _____
| ||_ _||_ _| (e-mail address removed)-berlin.de
_ | | | | | |
| |_| | | | | | http://www.physik.fu-berlin.de/~toerring
\___/ens|_|homs|_|oerring
 
T

Tim Quon

Impossible to tell because you neither tell us how the "struct timeVal"
looks like nor where its layout is documented and what the members of
the structure (whatever they are) are good for.

<OT>
If you mean a "struct timeval", used e.g. in nonstandard function
like gettimeofday() then just set the tv_sec member to 3 and the
tv_usec member to 0.
</OT>
Regards, Jens

Yeah, that's exaclty what I meant!

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top