Index: /branches/BNC_2.12/src/GPSDecoder.cpp
===================================================================
--- /branches/BNC_2.12/src/GPSDecoder.cpp	(revision 8372)
+++ /branches/BNC_2.12/src/GPSDecoder.cpp	(revision 8373)
@@ -45,4 +45,5 @@
 #include "bncsettings.h"
 #include "bncrinex.h"
+#include "bncutils.h"
 
 using namespace std;
@@ -80,6 +81,6 @@
 void GPSDecoder::dumpRinexEpoch(const t_satObs& obs, const QByteArray& format) {
   if (_rnx) {
-    long iSec    = long(floor(obs._time.gpssec()+0.5));
-    if (_rnx->samplingRate() == 0 || iSec % _rnx->samplingRate() == 0) {
+    int sec = int(nint(obs._time.gpssec()*10));
+    if (_rnx->samplingRate() == 0 || sec % (_rnx->samplingRate()*10) == 0) {
       _rnx->deepCopy(obs);
     }
Index: /branches/BNC_2.12/src/bnccaster.cpp
===================================================================
--- /branches/BNC_2.12/src/bnccaster.cpp	(revision 8372)
+++ /branches/BNC_2.12/src/bnccaster.cpp	(revision 8373)
@@ -303,7 +303,6 @@
     if (epoTime <= maxTime) {
       const QList<t_satObs>& allObs = itEpo.value();
-      int sec = int(nint(epoTime.gpssec()));
-      if ( (_out || _sockets) && (_samplingRate == 0 || sec % _samplingRate == 0) ) {
-
+      int sec = int(nint(epoTime.gpssec()*10));
+      if ( (_out || _sockets) && (_samplingRate == 0 || sec % (_samplingRate*10) == 0) ) {
         QListIterator<t_satObs> it(allObs);
         bool firstObs = true;
Index: /branches/BNC_2.12/src/bnctime.cpp
===================================================================
--- /branches/BNC_2.12/src/bnctime.cpp	(revision 8372)
+++ /branches/BNC_2.12/src/bnctime.cpp	(revision 8373)
@@ -37,10 +37,10 @@
   int  deltad;
   int  dow = 0;
-  while ( gpssec >= 86400 ) {
-    gpssec-=86400;
+  while ( gpssec >= 86400.0 ) {
+    gpssec-=86400.0;
     dow++;
   }
-  while ( gpssec <  0 ) {
-    gpssec+=86400;
+  while ( gpssec <  0.0 ) {
+    gpssec+=86400.0;
     dow--;
   }
@@ -59,10 +59,10 @@
   gpssec += 14.0;
   gpsw   += 1356.0;
-  while ( gpssec >= 86400 ) {
-    gpssec-=86400;
+  while ( gpssec >= 86400.0 ) {
+    gpssec-=86400.0;
     dow++;
   }
-  while ( gpssec <  0 ) {
-    gpssec+=86400;
+  while ( gpssec <  0.0 ) {
+    gpssec+=86400.0;
     dow--;
   }
@@ -142,10 +142,10 @@
   _sec = daysec;
   _mjd = mjd;
-  while ( _sec >= 86400 ) {
-    _sec-=86400;
+  while ( _sec >= 86400.0 ) {
+    _sec-=86400.0;
     _mjd++;
   }
-  while ( _sec <  0 ) {
-    _sec+=86400;
+  while ( _sec <  0.0 ) {
+    _sec+=86400.0;
     _mjd--;
   }
Index: /branches/BNC_2.12/src/latencychecker.cpp
===================================================================
--- /branches/BNC_2.12/src/latencychecker.cpp	(revision 8372)
+++ /branches/BNC_2.12/src/latencychecker.cpp	(revision 8373)
@@ -327,7 +327,8 @@
       const t_satObs& obs = it.next();
       bool wrongObservationEpoch = checkForWrongObsEpoch(obs._time);
-      l._newSec = static_cast<int>(obs._time.gpssec());
+      l._newSec = static_cast<int>(nint(obs._time.gpssec()*10));
       if (l._newSec > l._oldSec && !wrongObservationEpoch) {
-        if (l._newSec % _miscIntr < l._oldSec % _miscIntr) {
+        if (l._newSec % _miscIntr < l._oldSec % (_miscIntr * 10)) {
+ 
           if (l._numLat > 0) {
             if (l._meanDiff > 0.0) {
Index: /branches/BNC_2.12/src/rinex/reqcedit.cpp
===================================================================
--- /branches/BNC_2.12/src/rinex/reqcedit.cpp	(revision 8372)
+++ /branches/BNC_2.12/src/rinex/reqcedit.cpp	(revision 8373)
@@ -336,6 +336,6 @@
         }
 
-        if (_samplingRate == 0 ||
-            fmod(round(epo->tt.gpssec()), _samplingRate) == 0) {
+        int sec = int(nint(epo->tt.gpssec()*10));
+        if (_samplingRate == 0 || sec % (_samplingRate*10) == 0) {
           applyLLI(obsFile, epo);
           outObsFile.writeEpoch(epo);
