Commit 23714018 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

round to milliseconds

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 3032
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 27c289e6
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: sffxx.cc,v 1.31 2009-12-07 10:20:49 tforb Exp $
* $Id: sffxx.cc,v 1.32 2010-04-13 11:11:00 tforb Exp $
* \author Thomas Forbriger
* \date 21/12/2003
*
......@@ -61,18 +61,21 @@
* - 17/12/2007 V1.12 - modified output format (printf), since underlying
* Fortran code of libtime does no longer use
* long int
* - 13/04/2010 V1.13 - round time correctly to milliseconds when writing
* WID2 line
*
* ============================================================================
*/
#define TF_SFFXX_CC_VERSION \
"TF_SFFXX_CC V1.12"
"TF_SFFXX_CC V1.13"
#define TF_SFFXX_CC_CVSID \
"$Id: sffxx.cc,v 1.31 2009-12-07 10:20:49 tforb Exp $"
"$Id: sffxx.cc,v 1.32 2010-04-13 11:11:00 tforb Exp $"
#include<sstream>
#include <sffxx.h>
#include <gsexx.h>
#include <cstdio>
#include <cmath>
namespace sff {
......@@ -603,7 +606,8 @@ c (90.0 if horizontal)
wid2line.Fminute=date.minute();
// wid2line.Fseconds=double(date.second())+
// 1.e-3*double(date.milsec()+1.e-3*double(date.micsec()));
wid2line.Fmilsec=date.second()*1000+date.milsec();
wid2line.Fmilsec=date.second()*1000+date.milsec()+
int(rint(1.e-3*date.micsec()));
wid2line.Fstation=station;
wid2line.Fchannel=channel;
wid2line.Fauxid=auxid;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment