Changeset 55:fa05d8dd30a2 in xplra for test/basicctest.c


Ignore:
Timestamp:
02/16/13 18:14:55 (11 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
hg-Phase:
(<MercurialRepository 3 'hg:/home/ivaradi/xplane/hg/xplra' '/'>, 'public')
Message:

Added the C client API for hotkey handling and the test program. Also changed the name of _sleep to xplra_sleep to be able to compile the code for Windows

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/basicctest.c

    r40 r55  
    4343
    4444#ifdef _WIN32
    45 void _sleep(int ms)
     45void xplra_sleep(int ms)
    4646{
    4747    Sleep(ms);
    4848}
    4949#else
    50 void _sleep(int ms)
     50void xplra_sleep(int ms)
    5151{
    5252    usleep(ms*1000);
     
    367367
    368368    printf("Preparing for the message tests, sleeping for 5 seconds...\n");
    369     _sleep(5*1000);
     369    xplra_sleep(5*1000);
    370370
    371371    printf("Showing a message for 10 seconds...\n");
     
    375375
    376376    printf("Sleeping for 3 seconds...\n");
    377     _sleep(3*1000);
     377    xplra_sleep(3*1000);
    378378
    379379    printf("Showing another message interrupting the previous one for 3 seconds");
     
    383383
    384384    printf("Sleeping for 5 seconds...\n");
    385     _sleep(5*1000);
     385    xplra_sleep(5*1000);
    386386    if (xplra_show_message(connectionID, "[basictest] and the tests come to an end!", 5.0)<0) {
    387387        goto error;
     
    389389
    390390    goto cleanup;
     391
    391392error:
    392393    errorString = xplra_get_last_error_string(connectionID);
Note: See TracChangeset for help on using the changeset viewer.