[M3devel] JVideo/struct_timeval?

Jay K jay.krell at cornell.edu
Mon Apr 12 15:03:26 CEST 2010


This seems wierd:

 

 

C:\dev2\cm3.2\m3-ui\jvideo\src\POSIX\jvprotocol.i3(193):      timestamp: Utime.struct_timeval;


I think they are defining a wire protocol, but embedding platform-specific types in it.

How about I just change to Time.T? (64bit floating point, seconds since 1970).

We could do like:

 

C:\dev2\cm3.2\m3-ui\jvideo\src\POSIX\decunix\JVSink.m3(440):    jvb.timestamp.tv_sec := signed_ntohl(hdr.timestamp.tv_sec);


and define it to be transferred as a network order 64bit integer (big endian LONGINT), or maybe an array of 8 bytes.

 

Or maybe define a local struct_timeval separate from Utime that hardcodes the sizes..and maybe using LONGINT?

  32bit time_t is apparently still very common, though it seems obviously a big mistake..

 

 - Jay
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20100412/6b0d7de3/attachment-0001.html>


More information about the M3devel mailing list