1.代码
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<windows.h>
#include<time.h>
void print()
{
printf("****************关机程序****************\n");
printf("****1.实现在十分钟内的定时关闭计算机****\n");
printf("************2.立即关闭计算机************\n");
printf("***************3.注销计算机*************\n");
printf("****************4.退出系统**************\n");
//return 0;
}
void sleep(long wait)//挂起操作
{
long goal;
goal=wait+clock();
while(goal>clock());
}
void gettime()
{
int i=GetTickCount();//返回的是毫秒
int h=(i/1000)/3600;
int m=(i/1000)/60-h*60;
int s=(i/1000)-h*3600-m*60;
printf("%3d 小时 %2d分 %2d 秒\n",h,m,s);
}
int main()
{
//修改系统的时间
/*system("date");
system("pause");
system("CMD");
system("pause");*/
//获取开机时间
/*
int flag=1;
char time[12