20 #include <ndb_global.h>
32 int main(
int argc,
const char** argv){
36 const char * _database=
"BANK";
39 {
"wait",
'w', arg_integer, &_wait,
"Max time to wait between days",
"secs" },
40 {
"database",
'd', arg_string, &_database,
"Database name",
""},
41 {
"usage",
'?', arg_flag, &_help,
"Print help",
"" }
43 int num_args =
sizeof(args) /
sizeof(args[0]);
46 "This program will increase time in the bank\n";
48 if(getarg(args, num_args, argc, argv, &optind) || _help) {
49 arg_printusage(args, num_args, argv[0], desc);
50 return NDBT_ProgramExit(NDBT_WRONGARGS);
56 return NDBT_ProgramExit(NDBT_FAILED);
59 Bank bank(con,_database);
61 if (bank.performIncreaseTime(_wait) != 0)
62 return NDBT_ProgramExit(NDBT_FAILED);
64 return NDBT_ProgramExit(NDBT_OK);