<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title>Форум QUIK [тема: После длительной работы QUIK: os.clock() =-0.001]</title>
		<link>http://forum.quik.ru</link>
		<description>Новое в теме После длительной работы QUIK: os.clock() =-0.001 форума  на сайте Форум QUIK [forum.quik.ru]</description>
		<language>ru</language>
		<docs>http://backend.userland.com/rss2</docs>
		<pubDate>Sun, 19 Apr 2026 08:36:45 +0300</pubDate>
		<item>
			<title>После длительной работы QUIK: os.clock() =-0.001</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message74439/topic8519/">После длительной работы QUIK: os.clock() =-0.001</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Вы можете использовать 64-разрядную <noindex><a href="https://learn.microsoft.com/ru-ru/cpp/c-runtime-library/reference/time-time32-time64?view=msvc-170" target="_blank" rel="nofollow">time</a></noindex> функцию или функцию Windows <noindex><a href="https://learn.microsoft.com/ru-ru/windows/win32/api/profileapi/nf-profileapi-queryperformancecounter" target="_blank" rel="nofollow">QueryPerformanceCounter</a></noindex> для записи процесса, прошедшего много лет. <br />
			<i>20.02.2024 22:31:41, nikolz.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message74439/topic8519/</link>
			<guid>http://forum.quik.ru/messages/forum10/message74439/topic8519/</guid>
			<pubDate>Tue, 20 Feb 2024 22:31:41 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>После длительной работы QUIK: os.clock() =-0.001</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message74438/topic8519/">После длительной работы QUIK: os.clock() =-0.001</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			дополню ответ:<br /><B> Если процесс выполняется дольше, значение, возвращаемое функций clock, всегда равно (clock_t)(-1) в соответствии со стандартами ISO C99 (7.23.2.1) и ISO C11 (7.27.2.1).</B> <br />
			<i>20.02.2024 22:30:27, nikolz.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message74438/topic8519/</link>
			<guid>http://forum.quik.ru/messages/forum10/message74438/topic8519/</guid>
			<pubDate>Tue, 20 Feb 2024 22:30:27 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>После длительной работы QUIK: os.clock() =-0.001</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message74437/topic8519/">После длительной работы QUIK: os.clock() =-0.001</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			<br />====quote====<br /><a class="blog-p-user-name" id="bp_3pFlRDx3" href="/user/1466/" bx-tooltip-user-id="1466">Михаил Понамаренко</a> написал:<br />Если повторится попробую второе.<br />=============<br /> <img src="http://forum.quik.ru/upload/main/smiles/5/icon_smile.png" border="0" data-code=":smile:" data-definition="SD" alt=":smile:" style="width:16px;height:16px;" title="С улыбкой" class="bx-smile" /> Обязательно повторится на 25-й день, вам же <noindex><a href="https://forum.quik.ru/user/16011/" target="_blank" rel="nofollow">paluke</a></noindex> написал почему: &quot;Microsoft implements clock_t as a <B>long</B>, a signed 32-bit integer, and the CLOCKS_PER_SEC macro is defined as 1000. This macro gives a maximum <B>clock</B><B> function return value of 2147483.647 seconds, or about 24.8 days</B>&quot;. <br />
			<i>20.02.2024 19:17:48, Игорь М.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message74437/topic8519/</link>
			<guid>http://forum.quik.ru/messages/forum10/message74437/topic8519/</guid>
			<pubDate>Tue, 20 Feb 2024 19:17:48 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>После длительной работы QUIK: os.clock() =-0.001</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message74436/topic8519/">После длительной работы QUIK: os.clock() =-0.001</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			А что вам дает 1 мс, если рассинхрон с сервером брокера до 100 мс бывает? Тут как не синхронизируй часы ПК, синхронности с брокером не получишь. Даже если предположить, что это обойдем, то простая синхронизация времени ПК все равно будет не идеальна +-10 мс после синхронизации. Тут была тема про это, там все очень плохо на ПК в аппаратной части с этой точки зрения. <br />
			<i>20.02.2024 17:48:06, Cyber.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message74436/topic8519/</link>
			<guid>http://forum.quik.ru/messages/forum10/message74436/topic8519/</guid>
			<pubDate>Tue, 20 Feb 2024 17:48:06 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>После длительной работы QUIK: os.clock() =-0.001</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message74435/topic8519/">После длительной работы QUIK: os.clock() =-0.001</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Ясно, спасибо. Тогда os.clock() лучше не использовать или добавить костыль для фикса -0.001.<br />Если повторится попробую второе. <br />
			<i>20.02.2024 17:40:27, Михаил Понамаренко.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message74435/topic8519/</link>
			<guid>http://forum.quik.ru/messages/forum10/message74435/topic8519/</guid>
			<pubDate>Tue, 20 Feb 2024 17:40:27 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>После длительной работы QUIK: os.clock() =-0.001</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message74417/topic8519/">После длительной работы QUIK: os.clock() =-0.001</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Ну при чем тут quik? Это родная функция lua <noindex><a href="https://www.lua.org/manual/5.4/manual.html#pdf-os.clock" target="_blank" rel="nofollow">https://www.lua.org/manual/5.4/manual.html#pdf-os.clock</a></noindex><br />Ну и использует она функцию clock() из С. А у майкрософт реазизация такая: <noindex><a href="https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/clock?view=msvc-170" target="_blank" rel="nofollow">https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/clock?view=msvc-170</a></noindex> <br />====quote====<br /> If the elapsed time is unavailable or <B>has exceeded the maximum positive time that can be recorded as a clock_t type</B>, the function returns the value <B>(clock_t)(-1).</B><br /><br />=============<br /><br />Так что это в майкрософт писать надо. В линуксе по другому, там оно при переполнении возвращается к 0: <noindex><a href="https://man7.org/linux/man-pages/man3/clock.3.html#NOTES" target="_blank" rel="nofollow">https://man7.org/linux/man-pages/man3/clock.3.html#NOTES</a></noindex> <br />====quote====<br />Note that the time can wrap around. &nbsp;On a 32-bit system where CLOCKS_PER_SEC equals 1000000 this function will return the same value approximately every 72 minutes.<br />=============<br /> <br />
			<i>20.02.2024 08:04:20, paluke.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message74417/topic8519/</link>
			<guid>http://forum.quik.ru/messages/forum10/message74417/topic8519/</guid>
			<pubDate>Tue, 20 Feb 2024 08:04:20 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>После длительной работы QUIK: os.clock() =-0.001</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message74403/topic8519/">После длительной работы QUIK: os.clock() =-0.001</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			QUIK 11.0.3.1 работал без перезапуска четыре недели.<br />os.clock() =-0.001<br />Перезапустил QUIK всё стало на свои места. <br />
			<i>19.02.2024 18:27:15, Михаил Понамаренко.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message74403/topic8519/</link>
			<guid>http://forum.quik.ru/messages/forum10/message74403/topic8519/</guid>
			<pubDate>Mon, 19 Feb 2024 18:27:15 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
	</channel>
</rss>
