Reputation: 1389
So I have a function which takes "const boost::posix_time::time_duration& t" as an attribute and I can't find any information on how to do something as simple as set the duration 2 seconds (or whatever) in to the future. Lots of complex stuff explained in boost.org but I can't find any info on how to get the current time in some manageable form to which I can add a couple of seconds. This has to be something really simple but I can't figure it out...
Upvotes: 2
Views: 306
Reputation: 103733
time_duration
doesn't hold a time as in "a specific point in time". It holds a length of time. If you want that length to be 2 seconds, you can do this:
t = boost::posix_time::seconds(2);
Upvotes: 2