Boost logo

Boost Users :

From: Philippe Mondon (philippe.mondon_at_[hidden])
Date: 2007-07-27 11:18:56


Thanks,
I solved the problem using doubles.
Regards.

-----Original Message-----
From: boost-users-bounces_at_[hidden]
[mailto:boost-users-bounces_at_[hidden]] On Behalf Of Zeljko Vrba
Sent: jeudi 26 juillet 2007 19:00
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] Creating an equivalent to
java'sSystem.currentTimeMillis

On Thu, Jul 26, 2007 at 05:28:50PM +0200, Philippe Mondon wrote:
>
> //long returnVal = tduration.total_milliseconds();
> long returnVal = tperiod.length().total_milliseconds();
>
>
> Unfortunately, it gives only a 8 digit number (in java you've got a 13
> digit number when using currentTimeMillis) so I suspect that it does
not
> give a duration since Jan the 1st 1970 (which is java reference).
>
Integer overflow: long is 32 bits on 32-bit machine, and 13 digits does
*not* fit into 32 bits. ("long" is incidentally 64-bit in Java).

_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users

Ce message et ses pièces jointes (le "message") est destiné à l'usage
exclusif de son destinataire.
Si vous recevez ce message par erreur, merci d'en aviser immédiatement
l'expéditeur et de le détruire ensuite. Le présent message pouvant
être altéré à notre insu, CALYON Crédit Agricole CIB
ne peut pas être engagé par son contenu. Tous droits réservés.
          
This message and/or any attachments (the "message") is intended for
the sole use of its addressee.
If you are not the addressee, please immediately notify the sender and
then destroy the message. As this message and/or any attachments may
have been altered without our knowledge, its content is not legally
binding on CALYON Crédit Agricole CIB. All rights reserved.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net