# How to push data in queue with $realtime

**URL:** <https://verificationacademy.com/forums/t/how-to-push-data-in-queue-with-realtime/39843>\
**Category:** SystemVerilog\
**Tags:** SystemVerilog, queues-systemverilog\
**Created:** [November 24, 2021, 11:12am UTC](https://verificationacademy.com/forums/t/how-to-push-data-in-queue-with-realtime/39843 "2021-11-24T11:12:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![m\_r\_m](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/m/5daacb/32.png) [@m\_r\_m](https://verificationacademy.com/forums/u/m_r_m)\
**Post date:** [November 24, 2021, 11:12am UTC](https://verificationacademy.com/forums/t/how-to-push-data-in-queue-with-realtime/39843/1 "2021-11-24T11:12:20Z")

</div>

```verilog

seq_item_q qu[$];

function write_scb(seq_item obj);
env_ptr.scb[agt_num].qu.push_back(obj);
// env_ptr represent env[i]
// based on agt_num pushing to queue and 
// retrieving from the queue based on the agt_num 
endfunction

```

I wanna push the $realtime to the queue and retrieve the same so I can check for actual vs expected time or some operations w/ time period

---

<div class="post-metadata">

**Author:** ![cgales](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/c/ccd318/32.png) [@cgales](https://verificationacademy.com/forums/u/cgales)\
**Post date:** [November 24, 2021, 1:01pm UTC](https://verificationacademy.com/forums/t/how-to-push-data-in-queue-with-realtime/39843/2 "2021-11-24T13:01:35Z")

</div>

_In reply to [m\_r\_m](https://verificationacademy.com/forums/t/how-to-push-data-in-queue-with-realtime/39843):_

You should add a variable to your sequence\_item so that you can timestamp them as required.
