Changeset 10922


Ignore:
Timestamp:
06/07/11 22:17:12 (14 years ago)
Author:
tbretz
Message:
Added a wait command.
Location:
trunk/FACT++/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/Console.cc

    r10860 r10922  
    8989        return true;
    9090
     91    if (str.substr(0, 3)==".w ")
     92    {
     93        fLogO.Display(true);
     94        fLogO.SetBacklog(false);
     95        fLogO.SetNullOutput(false);
     96        usleep(atoi(str.c_str()+3)*1000);
     97        fLogO.SetNullOutput(true);
     98        fLogO.SetBacklog(true);
     99        return true;
     100    }
     101
    91102    if (Readline::Process(str))
    92103        return true;
  • trunk/FACT++/src/Readline.cc

    r10868 r10922  
    897897    fprintf(rl_outstream, "   c,commands   Dump available commands\n");
    898898    fprintf(rl_outstream, "   k,keylist    Dump key bindings\n");
     899    fprintf(rl_outstream, "   .w n         Sleep n milliseconds\n");
    899900    fprintf(rl_outstream, "   .x filename  Execute a script of commands\n");
    900901    fprintf(rl_outstream, "   .q,quit      Quit\n");
     
    942943bool Readline::Process(const string &str)
    943944{
     945    if (str.substr(0, 3)==".w ")
     946    {
     947         usleep(atoi(str.c_str()+3)*1000);
     948         return true;
     949    }
     950
    944951    if (str.substr(0, 3)==".x ")
    945952    {
Note: See TracChangeset for help on using the changeset viewer.