Re: Error: incompatible types for 'shared(SysTime)' and 'shared(SysTime)'

2018-09-14 Thread Arafel via Digitalmars-d-learn
On 09/13/2018 06:59 PM, ag0aep6g wrote: On 09/13/2018 03:25 PM, Arafel wrote: // How can we update the timestamp? Neither of those work timestamp = Clock.currTime; timestamp = cast(shared) Clock.currTime; cast() timestamp = Clock.currTime; Still not there... it

Re: Error: incompatible types for 'shared(SysTime)' and 'shared(SysTime)'

2018-09-14 Thread Arafel via Digitalmars-d-learn
(*(cast (SysTime*) ())).foo; Not exactly obvious or user-friendly...

Re: Error: incompatible types for 'shared(SysTime)' and 'shared(SysTime)'

2018-09-13 Thread ag0aep6g via Digitalmars-d-learn
On 09/13/2018 03:25 PM, Arafel wrote:     // How can we update the timestamp? Neither of those work     timestamp = Clock.currTime;     timestamp = cast(shared) Clock.currTime; cast() timestamp = Clock.currTime;

Re: Error: incompatible types for 'shared(SysTime)' and 'shared(SysTime)'

2018-09-13 Thread Arafel via Digitalmars-d-learn
On 07/05/2016 04:16 PM, ag0aep6g wrote: 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 Sorry to resurrect an old thread, but then how can one update a SysTime field in a shared

Re: Error: incompatible types for 'shared(SysTime)' and 'shared(SysTime)'

2016-07-05 Thread ag0aep6g via Digitalmars-d-learn
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

Re: Error: incompatible types for 'shared(SysTime)' and 'shared(SysTime)'

2016-07-04 Thread ketmar via Digitalmars-d-learn
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

Error: incompatible types for 'shared(SysTime)' and 'shared(SysTime)'

2016-07-04 Thread Luke Picardo via Digitalmars-d-learn
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.