亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? timestamp.hpp

?? 在Linux/Unix環(huán)境下發(fā)包測試性能的工具
?? HPP
字號:
/*---------------------------------------------------------------  * Copyright (c) 1999,2000,2001,2002,2003                        * The Board of Trustees of the University of Illinois             * All Rights Reserved.                                            *---------------------------------------------------------------  * Permission is hereby granted, free of charge, to any person     * obtaining a copy of this software (Iperf) and associated        * documentation files (the "Software"), to deal in the Software   * without restriction, including without limitation the           * rights to use, copy, modify, merge, publish, distribute,         * sublicense, and/or sell copies of the Software, and to permit      * persons to whom the Software is furnished to do * so, subject to the following conditions:  * *      * Redistributions of source code must retain the above  * copyright notice, this list of conditions and  * the following disclaimers.  * *      * Redistributions in binary form must reproduce the above  * copyright notice, this list of conditions and the following  * disclaimers in the documentation and/or other materials  * provided with the distribution.  *  *      * Neither the names of the University of Illinois, NCSA,  * nor the names of its contributors may be used to endorse  * or promote products derived from this Software without * specific prior written permission.  *  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND  * NONINFRINGEMENT. IN NO EVENT SHALL THE CONTIBUTORS OR COPYRIGHT  * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  * ________________________________________________________________ * National Laboratory for Applied Network Research  * National Center for Supercomputing Applications  * University of Illinois at Urbana-Champaign  * http://www.ncsa.uiuc.edu * ________________________________________________________________  * * Timestamp.hpp * by Mark Gates <mgates@nlanr.net> * ------------------------------------------------------------------- * A generic interface to a timestamp. * This implementation uses the unix gettimeofday(). * ------------------------------------------------------------------- * headers * uses *   <sys/types.h> *   <sys/time.h> *   <unistd.h> * ------------------------------------------------------------------- */#ifndef TIMESTAMP_H#define TIMESTAMP_H#include "headers.h"/* ------------------------------------------------------------------- */class Timestamp {public:    /* -------------------------------------------------------------------     * Create a timestamp, with the current time in it.     * ------------------------------------------------------------------- */    Timestamp( void ) {        setnow();    }    /* -------------------------------------------------------------------     * Create a timestamp, with the given seconds/microseconds     * ------------------------------------------------------------------- */    Timestamp( long sec, long usec ) {        set( sec, usec );    }    /* -------------------------------------------------------------------     * Create a timestamp, with the given seconds     * ------------------------------------------------------------------- */    Timestamp( double sec ) {        set( sec );    }    /* -------------------------------------------------------------------     * Set timestamp to current time.     * ------------------------------------------------------------------- */    void setnow( void ) {        gettimeofday( &mTime, NULL );    }    /* -------------------------------------------------------------------     * Set timestamp to the given seconds/microseconds     * ------------------------------------------------------------------- */    void set( long sec, long usec ) {        assert( sec  >= 0 );        assert( usec >= 0  &&  usec < kMillion );        mTime.tv_sec  = sec;        mTime.tv_usec = usec;          }    /* -------------------------------------------------------------------     * Set timestamp to the given seconds     * ------------------------------------------------------------------- */    void set( double sec ) {        mTime.tv_sec  = (long) sec;        mTime.tv_usec = (long) ((sec - mTime.tv_sec) * kMillion);    }    /* -------------------------------------------------------------------     * return seconds portion of timestamp     * ------------------------------------------------------------------- */    long getSecs( void ) {        return mTime.tv_sec;    }    /* -------------------------------------------------------------------     * return microseconds portion of timestamp     * ------------------------------------------------------------------- */    long getUsecs( void ) {        return mTime.tv_usec;    }    /* -------------------------------------------------------------------     * return timestamp as a floating point seconds     * ------------------------------------------------------------------- */    double get( void ) {        return mTime.tv_sec + mTime.tv_usec / ((double) kMillion);    }    /* -------------------------------------------------------------------     * subtract the right timestamp from my timestamp.     * return the difference in microseconds.     * ------------------------------------------------------------------- */    long subUsec( Timestamp right ) {        return(mTime.tv_sec  - right.mTime.tv_sec) * kMillion +        (mTime.tv_usec - right.mTime.tv_usec);    }    /* -------------------------------------------------------------------     * subtract the right timestamp from my timestamp.     * return the difference in microseconds.     * ------------------------------------------------------------------- */    long subUsec( timeval right ) {        return(mTime.tv_sec  - right.tv_sec) * kMillion +        (mTime.tv_usec - right.tv_usec);    }    /* -------------------------------------------------------------------     * subtract the right timestamp from my timestamp.     * return the difference in seconds as a floating point.     * ------------------------------------------------------------------- */    double subSec( Timestamp right ) {        return(mTime.tv_sec  - right.mTime.tv_sec) +        (mTime.tv_usec - right.mTime.tv_usec) / ((double) kMillion);    }    /* -------------------------------------------------------------------     * add the right timestamp to my timestamp.     * ------------------------------------------------------------------- */    void add( Timestamp right ) {        mTime.tv_sec  += right.mTime.tv_sec;        mTime.tv_usec += right.mTime.tv_usec;        // watch for under- and overflow        if ( mTime.tv_usec < 0 ) {            mTime.tv_usec += kMillion;            mTime.tv_sec--;        }        if ( mTime.tv_usec >= kMillion ) {            mTime.tv_usec -= kMillion;            mTime.tv_sec++;        }        assert( mTime.tv_usec >= 0  &&                mTime.tv_usec <  kMillion );    }    /* -------------------------------------------------------------------     * add the seconds to my timestamp.     * TODO optimize?     * ------------------------------------------------------------------- */    void add( double sec ) {        mTime.tv_sec  += (long) sec;        mTime.tv_usec += (long) ((sec - ((long) sec )) * kMillion);        // watch for overflow        if ( mTime.tv_usec >= kMillion ) {            mTime.tv_usec -= kMillion;            mTime.tv_sec++;        }        assert( mTime.tv_usec >= 0  &&                mTime.tv_usec <  kMillion );    }    /* -------------------------------------------------------------------     * return true if my timestamp is before the right timestamp.     * ------------------------------------------------------------------- */    bool before( Timestamp right ) {        return mTime.tv_sec < right.mTime.tv_sec  ||        (mTime.tv_sec == right.mTime.tv_sec &&         mTime.tv_usec < right.mTime.tv_usec);    }        /* -------------------------------------------------------------------     * return true if my timestamp is before the right timestamp.     * ------------------------------------------------------------------- */    bool before( timeval right ) {        return mTime.tv_sec < right.tv_sec  ||        (mTime.tv_sec == right.tv_sec &&         mTime.tv_usec < right.tv_usec);    }    /* -------------------------------------------------------------------     * return true if my timestamp is after the right timestamp.     * ------------------------------------------------------------------- */    bool after( Timestamp right ) {        return mTime.tv_sec > right.mTime.tv_sec  ||        (mTime.tv_sec == right.mTime.tv_sec &&         mTime.tv_usec > right.mTime.tv_usec);    }    /**     * This function returns the fraction of time elapsed after the beginning      * till the end     */    double fraction(Timestamp currentTime, Timestamp endTime) {        if ( (currentTime.after(*this)) && (endTime.after(currentTime)) ) {            return(((double)currentTime.subUsec(*this)) /                   ((double)endTime.subUsec(*this)));        } else {            return -1.0;        }    }protected:    enum {        kMillion = 1000000    };    struct timeval mTime;}; // end class Timestamp#endif // TIMESTAMP_H

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品电影院| 一区二区三区在线视频播放| 91尤物视频在线观看| 视频一区在线视频| 中文字幕一区二区在线观看| 日韩亚洲欧美中文三级| 91美女片黄在线观看| 久久av老司机精品网站导航| 亚洲线精品一区二区三区| 国产色91在线| 欧美一级淫片007| 欧美午夜电影一区| 99热精品国产| 国产成人av一区二区三区在线观看| 亚洲综合一区二区精品导航| 精品在线播放午夜| 亚洲国产欧美另类丝袜| 国产精品丝袜91| 久久久久国产免费免费| 91精品国产免费| 欧美日韩一区高清| 91丨九色porny丨蝌蚪| 国产aⅴ综合色| 国产一区二区三区在线观看免费 | 九九精品视频在线看| 亚洲v日本v欧美v久久精品| 一色桃子久久精品亚洲| 久久精品人人做人人综合| 精品国产制服丝袜高跟| 欧美一区二区三区免费在线看| 欧美色综合天天久久综合精品| 91在线观看下载| 成人v精品蜜桃久久一区| 国产成人av一区二区三区在线| 理论电影国产精品| 裸体歌舞表演一区二区| 久久99热这里只有精品| 蜜桃一区二区三区四区| 蜜桃视频在线一区| 麻豆成人综合网| 国内不卡的二区三区中文字幕 | 亚洲精品亚洲人成人网在线播放| 中文字幕欧美区| 欧美国产日韩在线观看| 国产欧美精品区一区二区三区 | 5566中文字幕一区二区电影| 欧美军同video69gay| 5月丁香婷婷综合| 日韩欧美国产电影| 精品欧美久久久| 久久久亚洲国产美女国产盗摄| 欧美r级在线观看| 久久精品人人做| 中文字幕一区二区三区四区| 亚洲视频在线一区| 亚洲图片欧美综合| 免费一级片91| 国产精品一区二区x88av| 不卡视频一二三| 欧美撒尿777hd撒尿| 欧美一二三区在线观看| 国产午夜久久久久| 亚洲免费在线观看视频| 日韩有码一区二区三区| 国产最新精品精品你懂的| 成人久久视频在线观看| 欧美亚一区二区| 亚洲一二三四区不卡| 日韩av在线发布| 粉嫩欧美一区二区三区高清影视| 99re成人在线| 制服视频三区第一页精品| 欧美va在线播放| 亚洲欧美日韩久久| 日本va欧美va瓶| av在线不卡观看免费观看| 欧美三级电影在线看| 精品999在线播放| 亚洲色图欧美偷拍| 日韩电影在线一区| 成人精品免费视频| 欧日韩精品视频| 久久日韩精品一区二区五区| 亚洲精品成人天堂一二三| 日本美女一区二区三区| 成人免费视频视频在线观看免费 | 狠狠色狠狠色合久久伊人| 99视频一区二区| 欧美一区二区黄| 日韩毛片一二三区| 日产国产高清一区二区三区| av在线不卡电影| 久久伊人蜜桃av一区二区| 亚洲一区二区三区四区在线观看| 精品欧美一区二区在线观看| 一区二区三区在线播放| 国产麻豆精品95视频| 3751色影院一区二区三区| 亚洲色图欧美在线| 国产麻豆一精品一av一免费| 欧美日韩不卡一区| 最好看的中文字幕久久| 国产精品自产自拍| 日韩一级片在线播放| 亚洲午夜久久久久久久久电影院 | 亚洲亚洲精品在线观看| 国产白丝精品91爽爽久久| 欧美一级欧美一级在线播放| 综合欧美一区二区三区| 国产成人av一区二区三区在线观看| 欧美一级在线视频| 亚洲成av人片| 91国偷自产一区二区使用方法| 国产精品大尺度| 国产福利一区二区三区视频 | 久久精品国产精品青草| 欧美日韩卡一卡二| 亚洲永久免费视频| 91麻豆福利精品推荐| 亚洲国产精品国自产拍av| 国产综合一区二区| 亚洲精品一区二区三区四区高清| 日本系列欧美系列| 欧美日韩极品在线观看一区| 亚洲一区二区三区激情| 91高清视频在线| 夜夜夜精品看看| 一区二区久久久| 91在线观看视频| 亚洲欧美日韩国产一区二区三区| 丁香亚洲综合激情啪啪综合| 日本一区二区三区四区在线视频| 国产成人综合自拍| 久久精品视频在线看| 国产精品一线二线三线精华| 久久久久9999亚洲精品| 国产福利精品导航| 欧美国产精品专区| 国产69精品一区二区亚洲孕妇| 国产欧美日韩久久| 播五月开心婷婷综合| 亚洲男人天堂av网| 欧美日韩综合色| 天堂久久久久va久久久久| 91精品国产一区二区三区蜜臀| 免费看精品久久片| 精品99999| 粉嫩高潮美女一区二区三区| 国产精品毛片高清在线完整版| 99精品桃花视频在线观看| 玉米视频成人免费看| 91精品久久久久久久99蜜桃| 久久99国产精品麻豆| 国产性天天综合网| 色综合久久88色综合天天6| 一区二区三区四区高清精品免费观看| 色婷婷亚洲精品| 日韩电影在线观看网站| 久久品道一品道久久精品| 春色校园综合激情亚洲| 亚洲一区二区在线视频| 欧美一区日本一区韩国一区| 国产在线精品国自产拍免费| 国产精品久久久久影院老司| 在线观看网站黄不卡| 日韩高清一区二区| 国产午夜精品一区二区| 欧美中文字幕久久| 免费观看一级欧美片| 国产精品久久午夜| 欧美日韩亚洲综合一区二区三区| 看片的网站亚洲| 亚洲人成网站在线| 欧美一区二区美女| kk眼镜猥琐国模调教系列一区二区| 亚洲夂夂婷婷色拍ww47| 精品少妇一区二区三区日产乱码 | 日本成人中文字幕在线视频| 久久久久久一二三区| 欧美在线不卡视频| 久久99精品久久久| 一卡二卡三卡日韩欧美| 久久综合狠狠综合久久综合88| 色94色欧美sute亚洲线路二| 久久成人综合网| 一区二区三区**美女毛片| 久久久99免费| 欧美人妖巨大在线| 成人小视频免费观看| 日韩电影在线观看网站| 亚洲视频一二区| 精品粉嫩aⅴ一区二区三区四区| 色999日韩国产欧美一区二区| 国内外成人在线| 亚洲午夜激情网站| 综合婷婷亚洲小说| 国产亚洲成年网址在线观看| 欧美一区在线视频| 欧美日韩一区小说| 97成人超碰视|