[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] 64 bit little endian



sslug@sslug wrote:
[snip]

En del er denne data er et 8x8 bytes eller 64 bits (little endian) timestamp: 7a 11 21 46 f6 05 00 00

Spørgsmålet er så endelig - Hvordan arbejder jeg nemmest med dette
timestamp og får dette konverteret til et læseligt tal?
Timestamp'et skulle også gerne på en eller anden måde ende i en struct?


union my_union { int64_t integer; unsigned char[8] bytes; } my_time;

memcpy(my_time.bytes, 'en pointer til data', 8);

printf("64-bit time: %jd\n", my_time.integer);


Med venlig hilsen Egon Andersen



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:10 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *