summaryrefslogtreecommitdiff
path: root/src/Message/Message.cxx
blob: 42de72e19088aedbe2a4a570418c4f9ced28f587 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// File:	Message.cxx
// Created:	Tue Nov 23 17:45:42 1999
// Author:	data exchange team
//		<det@kinox>


#include <Message.ixx>
#include <Message_Messenger.hxx>

#include <stdio.h>
#include <string.h>

//=======================================================================
//function : DefaultMessenger
//purpose  : 
//=======================================================================

const Handle(Message_Messenger)& Message::DefaultMessenger ()
{
  static Handle(Message_Messenger) aMessenger = new Message_Messenger;
  return aMessenger;
}

//=======================================================================
//function : FillTime
//purpose  : 
//=======================================================================

TCollection_AsciiString Message::FillTime (const Standard_Integer hour,
					       const Standard_Integer minute,
					       const Standard_Real second)
{
  char t [30];
  if (hour > 0)
    sprintf (t, "%02dh:%02dm:%.2fs", hour, minute, second);
  else if (minute > 0)
    sprintf (t, "%02dm:%.2fs", minute, second);
  else
    sprintf (t, "%.2fs", second);
  return TCollection_AsciiString (t);
}