MT5 and speed in action - page 51

 
Roman:

YesTimeCurrentMcs would be better, I join the wish.

TimeCurrentMsc(Msc is milliseconds, similar to the name in MqltTick.time_msc) is not needed for metering, but for the same thing as TimeCurrent.

In particular, for trade order logs. When analyzing whether the Market Watch was updated during OrderSend execution.

 
fxsaber:

TimeCurrentMsc(Msc stands for milliseconds, similar to the name in MqltTick.time_msc) is not needed for measuring, but for the same purpose as TimeCurrent.

In particular, for trade order logs. When analyzing whether the Market Watch was updated at the time OrderSend was executed.

Yes, the millisecond timestamp is very useful.
And if we have TimeCurrentMcs in microseconds, we can get any time from it.
You can get it in milliseconds or microseconds.
It's more practical.

 

only the international reference for milliseconds is ms

and msc is more like msk - Moscow time or mcs - microseconds

 
A100:

only the international reference for milliseconds is ms

while msc is more like msk - Moscow time or mcs - microseconds

I wanted to write about it too ))
But I refrained, because they will throw thumbs at me, like in mql -time_msc))

 
A100:

only the international reference for milliseconds is ms

and msc is more like msk - Moscow time or mcs - microseconds.

yes, ms is milliseconds.
and the international term for microseconds is µs.

Everyone has problems typing µ (mu) on the keyboard.
For those who don't know, mu can be typed on the keyboard as follows: Press Alt and dial 0181

https://ru.wikipedia.org/wiki/Alt-%D0%BA%D0%BE%D0%B4
 
Nikolai Semko:

yes, ms is milliseconds.
and the international symbol for microseconds is µs.

everyone has problems typing µ (mu) on the keyboard.
For those who don't know, mu can be typed on the keyboard as follows: Press alt and dial 0181.

then you can directly suggest this postfix for microsecond names _0181s instead of mcs. On the other hand, you can also write both micro and milli in full - then there will be no confusion

 
Nikolai Semko:

yes, ms is milliseconds.
and the international symbol for microseconds is µs.

everyone has problems typing µ (mu) on the keyboard.
For those who don't know, mu can be typed on the keyboard as follows: Press Alt and dial 0181.

https://ru.wikipedia.org/wiki/Alt-%D0%BA%D0%BE%D0%B4

Also works in the editor

u

 

Microsecond µsSleep()

//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
{
   while(!_StopFlag)
   {
      µsSleep(5000000); //5 секунд
      
      Print("Прошло 5000000 микросекунд");
   }  
}

//--------------------------------------------------------------------
void µsSleep(ulong µsRange) 
{
  ulong c = GetMicrosecondCount() + µsRange;  
  while(GetMicrosecondCount() < c);
}
2020.10.10 01:09:21.717 TestScript (MNQZ20,M1)  Прошло 5000000 микросекунд
2020.10.10 01:09:26.717 TestScript (MNQZ20,M1)  Прошло 5000000 микросекунд
2020.10.10 01:09:31.717 TestScript (MNQZ20,M1)  Прошло 5000000 микросекунд
2020.10.10 01:09:36.718 TestScript (MNQZ20,M1)  Прошло 5000000 микросекунд
2020.10.10 01:09:41.718 TestScript (MNQZ20,M1)  Прошло 5000000 микросекунд
2020.10.10 01:09:46.718 TestScript (MNQZ20,M1)  Прошло 5000000 микросекунд
2020.10.10 01:09:51.718 TestScript (MNQZ20,M1)  Прошло 5000000 микросекунд
2020.10.10 01:09:56.718 TestScript (MNQZ20,M1)  Прошло 5000000 микросекунд
2020.10.10 01:10:01.718 TestScript (MNQZ20,M1)  Прошло 5000000 микросекунд
2020.10.10 01:10:06.718 TestScript (MNQZ20,M1)  Прошло 5000000 микросекунд
 
Roman:

Microsecond µsleep()

Processor not spinning at full speed (one core)?

 
Andrey Khatimlianskii:

Is the processor not running at full speed (one core)?

Of course it does, it may use more than one core.


Think about overselling the resources of PPS servers when the ISP slices at best 20 Windows systems on one host.

There, 80% of CPU resources are really wasted in system overhead and implicit delays.