Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
chxavtimevalue.cpp
Package: 142_61_thumb_advanced.rar [view]
Upload User: dangjiwu
Upload Date: 2013-07-19
Package Size: 42019k
Code Size: 1k
Category:
Symbian
Development Platform:
Visual C++
- /*============================================================================*
- *
- * (c) 1995-2002 RealNetworks, Inc. Patents pending. All rights reserved.
- *
- *============================================================================*/
- //
- // normalize:
- //
- // normalize sec and usec in a TimeValue
- // This code was lifted from Doug Schmidt's ACE network communication package.
- //
- //
- #include "chxavtimevalue.h"
- static const long ONE_SECOND = 1000000L;
- void
- CHXAvTimeValue::normalize ()
- {
- // New code from Hans Rohnert...
- if (this->usec_ >= ONE_SECOND)
- {
- do
- {
- this->sec_++;
- this->usec_ -= ONE_SECOND;
- }
- while (usec_ >= ONE_SECOND);
- }
- else if (this->usec_ <= -ONE_SECOND)
- {
- do
- {
- this->sec_--;
- this->usec_ += ONE_SECOND;
- }
- while (this->usec_ <= -ONE_SECOND);
- }
- if (this->sec_ >= 1 && this->usec_ < 0)
- {
- this->sec_--;
- this->usec_ += ONE_SECOND;
- }
- else if (this->sec_ < 0 && this->usec_ > 0)
- {
- this->sec_++;
- this->usec_ -= ONE_SECOND;
- }
- }