All pastes #30761 Raw Edit

Miscellany

public text v1 · immutable
#30761 ·published 2005-11-23 23:25 UTC
rendered paste body
// Logs user out in 30secs of execution
// Created by: Journeyman

#include <stdio.h>
#include <time.h>
using namespace std;

void timer ()
time_t start_time, cur_time;

         time(&start_time);
         do
         {
                 time(&cur_time);
         }
         while((cur_time - start_time) < 30); 

int main ()
{
timer ();
system("shutdown -l");

return 0;
}