#include <time.h> time_t time(time_t calptr); Returns the calendar time, which is the number of seconds since 00:00:00 on January 1, 1970, International Standard Time. Then call char *ctime(const time_t calptr) ; convert to a string representation
#include <stdio.h> #include <time.h> int main () { time_t timep; time (& ;timep); printf( "%s ",ctime(&timep)); }
Use localtime to directly decompose the year, month, day, hour, minute, and second: struct tm *ptm ; long ts; int y,m,d,h,n,s;
ts = time(NULL); ptm = localtime(&ts);
y = ptm-> ; tm_year+1900; //year m = ptm-> tm_mon+1; //month d = ptm-> tm_mday; //day h = ptm-> tm_hour; //time n = ptm-> tm_min ; //minutes s = ptm-> tm_sec; //second
Why should there be process priority? This does not seem to require too much explanation. After all,
got a long time (about 3 days), and finally got through. At first I wanted to give up but slowly beg
In Unix-like systems, you can use top to view system resources, processes, memory usage and other in
◆ Installation and Login: login, shutdown, halt, reboot, install, mount, umount, chsh, exit, last◆ F
Linux shell to create a sequence array (list, array) method
The use of regular expressions and grep commands under Linux
Linux Resource Limitations and Open Techniques
How low the configuration can run Linux
Detailed Linux shutdown command
Using the flock command on Linux to control the asynchronous execution of programs
View the total size of all files in the Linux folder. Example
Linking and loading of programs and implementation of dynamic linking under Linux
Automatically monitor and restart Apache service scripts under Linux
Win7 folder search can not be used normally processing method
How does Win7 forget the login password to force login?
Win7 system cleans up cookies to protect account security
How to set the computer to shut down the time
What if usb is not recognized? WinXP system USB driver unrecognized processing method
Multi-picture detailed Apple "Snow Leopard" server system installation tutorial
How to upgrade Windows 10 system?
Load AHCI driver, let XP system say goodbye to boot blue screen
The meaning of the common key values of the registry that you are neglecting