当前位置: 首页>>代码示例>>C++>>正文


C++ TimeDuration::total_milliseconds方法代码示例

本文整理汇总了C++中TimeDuration::total_milliseconds方法的典型用法代码示例。如果您正苦于以下问题:C++ TimeDuration::total_milliseconds方法的具体用法?C++ TimeDuration::total_milliseconds怎么用?C++ TimeDuration::total_milliseconds使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TimeDuration的用法示例。


在下文中一共展示了TimeDuration::total_milliseconds方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: bufferingProcedure

void* Downloader::bufferingProcedure(void *receiver)
{
    Downloader* downloader = (Downloader *) receiver;

    uint32_t number = 0;

    IBufferItem *media = downloader->adaptation->getSegment(number);

    while(media != NULL)
    {
		Time t1(boost::posix_time::microsec_clock::local_time());
        media->start();
        media->wait();
		Time t2(boost::posix_time::microsec_clock::local_time());
		TimeDuration dt = t2 - t1;

        downloader->buffer->push(media);
        number++;

		downloader->adaptation->setBufferStatus(downloader->buffer->size()*1.0);
		downloader->adaptation->setDownloadTime(dt.total_milliseconds());

        media = downloader->adaptation->getSegment(number);
    }

    downloader->buffer->setEnd(true);
    return NULL;
}
开发者ID:bursant,项目名称:AdaptiveStreaming,代码行数:28,代码来源:Downloader.cpp

示例2: sleep

 inline void sleep(TimeDuration const& rel_time)
 {
     interruptible_wait(detail::pin_to_zero(rel_time.total_milliseconds()));
 }
开发者ID:4ukuta,项目名称:core,代码行数:4,代码来源:thread_data.hpp

示例3: sleep

 inline void sleep(TimeDuration const& rel_time)
 {
     interruptible_wait(static_cast<unsigned long>(rel_time.total_milliseconds()));
 }
开发者ID:Axitonium,项目名称:sourcesdkpython,代码行数:4,代码来源:thread_data.hpp

示例4: update

void AccelerationAction::update(TimeDuration delta) {
    velocity_ += acceleration_ * delta.total_milliseconds();
    if ((acceleration_ > 0 && velocity_ > targetVelocity_) || (acceleration_ < 0 && velocity_ < targetVelocity_)) {
        velocity_ = targetVelocity_;
    }
}
开发者ID:mikosz,项目名称:CoconutEngine,代码行数:6,代码来源:accelerationaction.cpp

示例5: rand_range

TimeDuration rand_range(const TimeDuration& start, const TimeDuration& stop) {
    unsigned int start_int = start.total_milliseconds();
    unsigned int stop_int = stop.total_milliseconds();
    return ptime::milliseconds(rr(start_int, stop_int));
}
开发者ID:NCAR,项目名称:wt-classes,代码行数:5,代码来源:TimeDuration.cpp

示例6: double

double TimeDuration::operator /(const TimeDuration& b) const {
    return double(total_milliseconds()) / double(b.total_milliseconds());
}
开发者ID:NCAR,项目名称:wt-classes,代码行数:3,代码来源:TimeDuration.cpp

示例7: update

void CameraMoveAction::update(TimeDuration delta) {
    AccelerationAction::update(delta);

    camera_.moveRelative(direction_.normalised() * velocity() * delta.total_milliseconds());
}
开发者ID:mikosz,项目名称:CoconutEngine,代码行数:5,代码来源:cameramoveaction.cpp


注:本文中的TimeDuration::total_milliseconds方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。