(注:此文章采用C++语言写法,并非C、C#、Python、Python3写法,请留意您的编程语言!!!)
#include<iostream>
using namespace std;
#include<ctime>
struct Time{
int hour;
int minute;
int second;
};
void set(Time *p,int h,int m,int s)
{
p->hour=h;
p->minute=m;
p->second=s;
}
void tick(Time *p)
{
long t=time(NULL);//time_t t=time(NULL);//清空当前时间
while(time(NULL)==t);
if(++p->second>=60)//++(p->second)
{
p