File: igtlOSUtil.h

package info (click to toggle)
openigtlink 3.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,080 kB
  • sloc: cpp: 20,076; ansic: 6,704; sh: 227; perl: 74; makefile: 46
file content (41 lines) | stat: -rw-r--r-- 1,108 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*=========================================================================

  Program:   The OpenIGTLink Library
  Language:  C++
  Web page:  http://openigtlink.org/

  Copyright (c) Insight Software Consortium. All rights reserved.

  This software is distributed WITHOUT ANY WARRANTY; without even
  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  PURPOSE.  See the above copyright notices for more information.

=========================================================================*/

#ifndef __igltOSUtil_h
#define __igltOSUtil_h

#include <cstring>

#include "igtlWin32Header.h"
namespace igtl
{

  /** Stop the program for the duration specified in millisecond
   *  The maximum dulation is 
   * */
  void IGTLCommon_EXPORT Sleep(int millisecond);

  /** Just in case strnlen() is not defined (e.g. Mac OS X Snow Leopard) */
#ifndef OpenIGTLink_HAVE_STRNLEN
  size_t IGTLCommon_EXPORT Strnlen(const char* s, size_t maxlen);
#else
  inline size_t IGTLCommon_EXPORT Strnlen(const char* s, size_t maxlen)
  { return strnlen(s, maxlen); }
#endif

}

#endif // __igltOSUtil_h