🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.c
Article #309925

Jakim cudem to działa?!? std::this_thread::sleep_for(1ms);

#309925
From: Szyk Cech
Date: Fri, 13 Sep 2019 18:27
18 lines
1540 bytes
Cześć!

Mam pytanie jak ta technika się nazywa i jak to właściwie działa:
std::this_thread::sleep_for(1ms);
Chodzi mi o wyrażenie: 1ms
Nie jest to string, nie jest to int ani float...
Czy zatem dla określenia czasu wprowadzono nowe typy? ms ns i s?

Mam książkę:
"C++ Biblioteka Standardowa" Nicolai M. Josuttis,  wydanie 2, Helion, 
Gliwice 2014.
I tam jest normalny kod:
this_thread::sleep_for(chrono::seconds(10));

Ktoś może mi to wyjaśnić?

Dzięki i pozdro!
Szyk Cech
Technical Details
Message-ID: <8cReF.190168$aI7.114261@fx22.am4>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed.pionier.net.pl!3.eu.feeder.erje.net!feeder.erje.net!news.unit0.net!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.am4!peer.am4.highwinds-media.com!news.highwinds-media.com!fx22.am4.POSTED!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed.pionier.net.pl!3.eu.feeder.erje.net!feeder.erje.net!news.unit0.net!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.am4!peer.am4.highwinds-media.com!news.highwinds-media.com!fx22.am4.POSTED!not-for-mail
Newsgroups: pl.comp.lang.c
X-Mozilla-News-Host: news://newshosting.com:119
From: Szyk Cech <szykcech@spoko.pl>
Subject: Jakim cudem to działa?!?
 std::this_thread::sleep_for(1ms);
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0
MIME-Version: 1.0
Lines: 18
Message-ID: <8cReF.190168$aI7.114261@fx22.am4>
X-Complaints-To: abuse(at)newshosting.com
NNTP-Posting-Date: Fri, 13 Sep 2019 18:27:16 UTC
Organization: Newshosting.com - Highest quality at a great price! www.newshosting.com
Date: Fri, 13 Sep 2019 20:27:30 +0200
X-Received-Bytes: 1413
X-Received-Body-CRC: 1287802497
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit