Hi:
        I wrote the simple application like this. 

#include <stdio.h>
#include <l4/util/rdtsc.h>
#include <l4/sys/l4int.h>
#include <l4/thread/thread.h>

char LOG_tag[4]="clk";

int main(void)
{
        l4_uint32_t     *second;
        l4_uint32_t     *nanosecond;
        l4_cpu_time_t   tsc;
        tsc = l4_rdtsc();
        l4_tsc_to_s_and_ns(tsc, second, nanosecond);
        printf("%d, %d \n", *second, *nanosecond);
}

The result is :
clk     | 0, 0
clk     |
clk     | Exiting with 6
        
        Does these code have some problems?
        Thank you.
                                                                                
                                        cheng

_______________________________________________
l4-hackers mailing list
[email protected]
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers

Reply via email to