Corrected demo mstpcap when building with Borland compiler. Thank you Martin!
This commit is contained in:
@@ -48,6 +48,15 @@
|
|||||||
#include "mstp.h"
|
#include "mstp.h"
|
||||||
#include "mstptext.h"
|
#include "mstptext.h"
|
||||||
|
|
||||||
|
#if defined(_WIN32)
|
||||||
|
#include <process.h> /* _beginthread */
|
||||||
|
#endif
|
||||||
|
#if defined(__BORLANDC__)
|
||||||
|
#include <sys/timeb.h>
|
||||||
|
#define _timeb timeb
|
||||||
|
#define _ftime(param) ftime(param)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef max
|
#ifndef max
|
||||||
#define max(a,b) (((a) (b)) ? (a) : (b))
|
#define max(a,b) (((a) (b)) ? (a) : (b))
|
||||||
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
||||||
@@ -73,6 +82,8 @@ static int gettimeofday(
|
|||||||
{
|
{
|
||||||
struct _timeb timebuffer;
|
struct _timeb timebuffer;
|
||||||
|
|
||||||
|
(void) tzp;
|
||||||
|
|
||||||
_ftime(&timebuffer);
|
_ftime(&timebuffer);
|
||||||
tp->tv_sec = timebuffer.time;
|
tp->tv_sec = timebuffer.time;
|
||||||
tp->tv_usec = timebuffer.millitm * 1000;
|
tp->tv_usec = timebuffer.millitm * 1000;
|
||||||
@@ -113,6 +124,8 @@ void Sleep(
|
|||||||
void *milliseconds_task(
|
void *milliseconds_task(
|
||||||
void *pArg)
|
void *pArg)
|
||||||
{
|
{
|
||||||
|
(void) pArg;
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
Sleep(1);
|
Sleep(1);
|
||||||
dlmstp_millisecond_timer();
|
dlmstp_millisecond_timer();
|
||||||
|
|||||||
Reference in New Issue
Block a user