server/tests: add SLEEP command to test_display_base

This commit is contained in:
Yonit Halperin 2012-05-02 13:39:04 +03:00
parent bccf5bc35a
commit a267a4b315
2 changed files with 10 additions and 0 deletions

View File

@ -498,6 +498,10 @@ static void produce_command(void)
command->cb(command);
}
switch (command->command) {
case SLEEP:
printf("sleep %u seconds\n", command->sleep.secs);
sleep(command->sleep.secs);
break;
case PATH_PROGRESS:
path_progress(&path);
break;

View File

@ -24,6 +24,7 @@ typedef enum {
SIMPLE_UPDATE,
DESTROY_PRIMARY,
CREATE_PRIMARY,
SLEEP
} CommandType;
typedef struct CommandCreatePrimary {
@ -45,6 +46,10 @@ typedef struct CommandDrawSolid {
uint32_t surface_id;
} CommandDrawSolid;
typedef struct CommandSleep {
uint32_t secs;
} CommandSleep;
typedef struct Command Command;
struct Command {
@ -55,6 +60,7 @@ struct Command {
CommandCreatePrimary create_primary;
CommandDrawBitmap bitmap;
CommandDrawSolid solid;
CommandSleep sleep;
};
};