Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
この答えを見つけるのが難しいのは奇妙に思えます。time.h と ctime を含めましたが、vc9 はまだ未定義の型「timespec」について不平を言っています。ここ、MSDN、および Web を検索しました (正確なコンパイラ エラーがあっても) が、答えが見つかりません。
正確なエラーは次のとおりです。
error C2027: use of undefined type 'timespec'
ありがとう
struct timespecposix に由来し、通常は UNIX で見られますが、Windows では見られません。
struct timespec
Windows で *nix-y の来歴を使用してコードをコンパイルしようとしている場合は、*nix のような環境を提供する cygwin や gcc などを使用する方がよい場合があります。