Last change
on this file since 2655 was 2655, checked in by ansari, 21 years ago |
Ajout 1ere version prg testclasse TimeStamp - Reza 11 Mars 2005
|
File size:
1.5 KB
|
Line | |
---|
1 | #include "sopnamsp.h"
|
---|
2 | #include "machdefs.h"
|
---|
3 | #include <stdio.h>
|
---|
4 | #include <stdlib.h>
|
---|
5 | #include "math.h"
|
---|
6 | #include <iostream>
|
---|
7 | #include <string>
|
---|
8 |
|
---|
9 | #include <typeinfo>
|
---|
10 | #include "timing.h"
|
---|
11 | #include "timestamp.h"
|
---|
12 | #include "histinit.h"
|
---|
13 | #include "pexceptions.h"
|
---|
14 |
|
---|
15 | int main(int narg, char* arg[])
|
---|
16 | {
|
---|
17 | cout << " ---- Programme ttimestamp.cc - Test classe TimeStamp --- " << endl;
|
---|
18 | int rc = 0;
|
---|
19 | try {
|
---|
20 | SophyaInit();
|
---|
21 | // PPRegister(FIO_SphereECP<r_8>);
|
---|
22 | // DObjRegister(FIO_SphereECP<r_8>, SphereECP<r_8>);
|
---|
23 |
|
---|
24 | InitTim();
|
---|
25 | TimeStamp ts;
|
---|
26 | cout << "ts: Now : " << ts << endl;
|
---|
27 | TimeStamp ts2("30/01/1962","14:22:35.65");
|
---|
28 | cout << "ts2: 30/01/1962 14:22:35.65 : " << ts2 << endl;
|
---|
29 | TimeStamp ts3("01/01/1905","00:00:00");
|
---|
30 | cout << "ts3: 01/01/1905 , 00:00:00 : " << ts3 << " (double): " << (double)ts3 << endl;
|
---|
31 | TimeStamp ts4("01/01/1901","03:00:20");
|
---|
32 | cout << "ts3: 01/01/1901 , 02:00:20 : " << ts4 << " (double): " << (double)ts4 << endl;
|
---|
33 |
|
---|
34 |
|
---|
35 | }
|
---|
36 | catch (PThrowable & exc) {
|
---|
37 | cerr << " tsphereecp.cc: Catched Exception (PThrowable)" << (string)typeid(exc).name()
|
---|
38 | << " - Msg= " << exc.Msg() << endl;
|
---|
39 | rc = 99;
|
---|
40 | }
|
---|
41 | catch (std::exception & e) {
|
---|
42 | cerr << " tsphereecp.cc: Catched std::xception "
|
---|
43 | << " - what()= " << e.what() << endl;
|
---|
44 | rc = 98;
|
---|
45 | }
|
---|
46 | catch (...) {
|
---|
47 | cerr << " ssphereecp.cc: some other exception (...) was caught ! " << endl;
|
---|
48 | rc = 97;
|
---|
49 | }
|
---|
50 | PrtTim("End tsphereecp " );
|
---|
51 | cout << " ---- Programme tsphereecp.cc - FIN (Rc=" << rc << ") --- " << endl;
|
---|
52 | return rc;
|
---|
53 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.