Exiting Run Phase

Hi All,

I found a code below-


class my_test extends uvm_test;
 `uvm_component_utils(my_test)
 
 
 ...
 ...
 
 task run_phase (uvm_phase phase);
   phase.raise_objection(this);
   my_seq.start(m_sequencer);
   /// Set a drain time for the Test
   phase.phase_done.set_drain_time(this, 20ns);
   phase.drop_objection(this);
 endtask: run_phase
 
endclass: my_test

How the set_drain_time is different from the regular delay? What if I just replace the line

phase.phase_done.set_drain_time(this, 20ns);

with

#20; //assuming 1cycle is 1ns 

In reply to possible:

If this is the only objection getting raised/dropped, then there is no difference. But the drain time applies to the last objection dropped, which could be coming from multiple places.