Ignore:
Timestamp:
06/05/12 17:23:36 (12 years ago)
Author:
tbretz
Message:
Moved switching off and on of the logging before and after a sleep to Lock() and Unlock() respectively.
File:
1 edited

Legend:

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

    r14071 r14083  
    8282}
    8383
     84void Console::Lock()
     85{
     86    // FIXME: Check missing
     87    fLogO.Display(true);
     88    fLogO.SetBacklog(false);
     89    fLogO.SetNullOutput(false);
     90}
     91
     92void Console::Unlock()
     93{
     94    // FIXME: Check missing
     95    fLogO.SetNullOutput(true);
     96    fLogO.SetBacklog(true);
     97}
     98
    8499// --------------------------------------------------------------------------
    85100//
     
    96111    if (str.substr(0, 3)==".w ")
    97112    {
    98         fLogO.Display(true);
    99         fLogO.SetBacklog(false);
    100         fLogO.SetNullOutput(false);
     113        Lock();
    101114        usleep(stoul(str.substr(3))*1000);
    102         fLogO.SetNullOutput(true);
    103         fLogO.SetBacklog(true);
     115        Unlock();
    104116        return true;
    105117    }
     
    205217// **************************************************************************
    206218
     219ConsoleStream::~ConsoleStream()
     220{
     221    fLogO.Display();
     222}
    207223
    208224// --------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.