[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Ok, anyone started Contiki 4 AII yet?
Rob <rsteinmetz@mindspring.com> wrote:
> CLK_TCK is defined in time.h. There is no definition for apple2. You
> could "spoof" it to see what happens next.
The sources will compile but won't link. The problem is not CLK_TCK, but the
missing clock() function. clock() returns a 32 bit value (as implemented in
cc65) that represents the CPU time used since some arbitrary point of time.
CLK_TCK (or better CLOCKS_PER_SEC which is the corresponding ISO C constant)
tells how many of the clock ticks make one second. Since most 6502 machines
don't do multitasking, CPU time and real time is identical.
Contiki uses clock() and CLK_TCK to implement timers. For example the TCP
stack needs timers to keep track of connection timeouts, packet retransmit
timeouts and so on. Without having a function that is able to measure time in
some way or the other, there is no way to implement a TCP stack.
Regards
Uz
--
Ullrich von Bassewitz uz@remove-to-reply.musoftware.de
7:12pm up 41 days, 3:07, 12 users, load average: 0.00, 0.08, 0.09