[ create a new paste ] login | about

Link: http://codepad.org/HiBbjX0V    [ raw code | output | fork ]

C++, pasted on Oct 8:
int main()
{

while (true)
{
    time_t t_tempostato;
    struct tm *tempostato;
    tempostato = (struct tm*)malloc(sizeof(struct tm));
    const char * tempoc= "2013-10-03 11:33:52";
    strptime(tempoc, "%Y-%m-%d %T", tempostato);
    t_tempostato = mktime(tempostato);

    cout << "Tempo in stato centrale: " <<t_tempostato << endl;
    char buffer [80];
    strftime (buffer,80,"Tempo in stato centrale: %D %T\n",tempostato);
    puts(buffer);
    sleep(1);

}
    
}
   


Output:
1
2
3
Tempo in stato centrale: 1380800032

Disallowed system call: SYS_nanosleep


Create a new paste based on this one


Comments: