www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Error: incompatible types for 'shared(SysTime)' and 'shared(SysTime)'

reply Luke Picardo <Picardo12 mail.com> writes:
if (curTime - lastMsgTime).total!"seconds") ...

Both are shared Durations.

also when I try to do

lastMsgTime = curTime;

Gives me

Error: non-shared method std.datetime.SysTime.opAssign is not 
callable using a shared object.
Jul 04 2016
parent reply ketmar <ketmar ketmar.no-ip.org> writes:
On Monday, 4 July 2016 at 20:54:53 UTC, Luke Picardo wrote:
 if (curTime - lastMsgTime).total!"seconds") ...

 Both are shared Durations.

 also when I try to do

 lastMsgTime = curTime;

 Gives me

 Error: non-shared method std.datetime.SysTime.opAssign is not 
 callable using a shared object.
cast `shared` away. yes, this is how you supposed to use it now: cast it away.
Jul 04 2016
parent ag0aep6g <anonymous example.com> writes:
On 07/05/2016 07:25 AM, ketmar wrote:
 cast `shared` away. yes, this is how you supposed to use it now: cast it
 away.
after having ensured thread safety that is
Jul 05 2016