Reprint Please specify Source: http://blog.csdn.net/luotuo44/article/details/39374759This article mainly deals with Linux time types, time functions, and sleep functions provided by Linux.the time type and the corresponding function:time_t:The most
Directory(i) causes (ii) hybrid spin lock (iii) q3.h and Ringbuffer (d) ringqueue (upper) spin lock (v) The Art of Ringqueue (middle) Sleep OpeningI have studied disruptor these days. NET version, due to. NET version follow-up, online only v2.10
Description: function name: SleepFunction: Execution hangs for a period of timeUsage: unsigned sleep (unsigned seconds);Using the top file in VC#include In the GCC compiler, the header file used differs depending on the GCC versionThe header files
Introduction:
Function Name: Sleep
Function: the execution is suspended for a period of time.
Usage: Unsigned sleep (unsigned seconds );
Use the header file in VC
# Include
In the GCC compiler, the header file used varies with the GCC
Sleep function in C Language
Sleep function:
Function: the execution is suspended for a period of time.
Usage: unsigned sleep (unsigned seconds );
Note:
Use the header file # include in VC. in Linux, the header file used by the gcc compiler varies
OneSleep is a thread-class method that causes this thread to pause execution for a specified time, giving the execution an opportunity to another thread, but the monitoring State remains, and then automatically resumes after the call to sleep does
Recently, for Linux development on arm, C Programs Written in windows need to be transplanted to Linux. The underlying SPI driver implementation and socket communication on the upper layer need to be rewritten, the application also needs to be
Previous code to get the current system time.
You can obtain the system time by checking the time () on the network. If you find any problem, you can only obtain the system time in seconds.
Then I found the following article:
========================
The meaning of Sleep (0) is to discard the current thread execution time slices and put itself in the waiting queue. At this point the other threads will get the time slice to program the program. Sleep (0) can reduce the execution speed of the
Sleep Function
1. Introduction
Function Name: Sleep
Function: the execution is suspended for a period of time.
Usage: Unsigned sleep (unsigned seconds );
Use the header file in VC
# Include
In the GCC compiler, the header file used varies
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.