[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ciderpress for OS/X?



In article 
<08a65be6-b51a-441a-ba11-469f0bc42cf1@f33g2000vbm.googlegroups.com>,
 datajerk <datajerk@gmail.com> wrote:

> On Aug 12, 10:01 am, "John B. Matthews" <nos...@nospam.invalid> wrote:
[...]
> > I get the same thing with %s, but %ju works. Of course, it only 
> > takes a few seconds with Sweet16! :-)
> 
> Excellent thanks for the ac help.  The %ju does clean up the screen 
> junk, however it is not reporting the system time.  time() returns 
> -1.  Does cc65 have support for getting the time from a //e?  Google 
> has been little help.

Interestingly, this returns the time to the nearest minute:

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

int main (void) {

    time_t starttime = time(NULL);
    time_t endtime = time(NULL);

    printf("Start time: %s\n",asctime(localtime(&starttime)));
    printf("  End time: %s\n",asctime(localtime(&endtime)));

    return EXIT_SUCCESS;
}

]-pi                                    
Start time: Wed Aug 12 23:31:00 2009    
                                        
  End time: Wed Aug 12 23:31:00 2009    

-- 
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>