----------------------------------------------------------------
--                                                              
--  File:   Checkpoint_TPCE_Database.SQL                        
--          Microsoft TPC-E Benchmark Kit Ver. 1.14.0-1031      
--          Copyright Microsoft, 2008-2015                  
--                                                              
----------------------------------------------------------------
USE	tpce
GO

DECLARE	@i			int,
		@loops		int,
		@date       datetime,
		@time		datetime,
		@timestr	varchar(10)

SET     @time	= getdate()

WHILE (2 > 1)
BEGIN

    SET @date   = CONVERT(DATETIME, CAST(getdate() AS BIGINT))
    
    SET @time   = DATEADD(second, 450, GETDATE() - @date)
    
    CHECKPOINT  435
    
    IF (GETDATE() - @date) < @time
        WAITFOR TIME @time
    
END
