Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   how can i change this code (http://www.go4expert.com/forums/i-change-code-t4847/)

davidrt 23Jun2007 23:45

how can i change this code
sorry for double posting, this is my code that shows current time how can i add codes to it that could add 30 minutes to the passed time?
thanks a lot

#include <stdio.h>
#include <time.h>

int main(void)
    time_t result;

    result = time(NULL);
    printf("%s%ju secs since the Epoch\n",
        asctime (localtime (&result)),
        (uintmax_t) result);
    return (0);

Edit by DaWei: added code tags

DaWei 24Jun2007 00:23

Re: how can i change this code
Thirty minutes is 1800 seconds. Add that to your initial value and convert as needed. Once more, please read the "Before you make a query" thread (right up there in the upper right corner) and learn to use code tags to preserve your formatting/indentation. I'm going to do it for you this time, but I ain't yo' mama.

shabbir 24Jun2007 09:42

Re: how can i change this code
davidrt, you have 4 thread relating to the same thing and please keep the things at one place to get better responses.

All times are GMT +5.5. The time now is 19:24.