pacci.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:PACCI 作者: SymSecGroup 项目源码 文件源码
def timer(startTime):
    global TIME_OUT_SIGNAL

    print ("in timerThread")

    sleepTime=10
    slice=options.timelimit
    total=0

    while (1):
        stopTime=time.time()
        totalTime=stopTime - startTime
        # print "in timerThread, total time now %f" %(total)
        if (slice * 2 <= totalTime):
            print "****Error in spark:too long time!"
            thread.interrupt_main()
            thread.exit()
        if (slice <= totalTime):
            print "timer:timeLock is locked!"
            break

        time.sleep(sleepTime)

    print "total time:%f" % (totalTime)

    TIME_OUT_SIGNAL=True
    # on_signal_usr1(0,0)
    # os.kill(pid,signal.SIGUSR1)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号