Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Globally record computer's timestamp for each item

Dear OS community, 

I am looking for a way, a script I believe, to automatically record the computer's timestamp whenever an item is introduced. That is, to create a new variable called "timestamp" that will log the computer's timestamp (using for example datetime.datetime.time(datetime.datetime.now())) of every item when it starts. for example the timestamp of fixation, timestamp of stimuli, timestamp of response, timestamp of blank screen, timestamp of logger, and then again when a new trial starts, the timestamp of fixation, timestamp of stimuli etc. 

I guess it could be done by adding an inline_script before each item but I wonder if there's a global way that will be more "parsimonious" in items. If not possible, I wonder if there's an automated way to calculate the computer's timestamp retrospectively by recording the timestamp at the end of the experiment and create the past timestamps according to the the structure of the experiment (using the time_ variables maybe?).

I'd be grateful for any help,

SH

Comments

  • Hi @S_H,

    I don't think you can achieve a programmatic way of recording the time stamp before object. If you want to record it manually, my guess is that you need to use code (python or javascript) before each object.

    However, I think you're actually trying to implement something that is already part of OS's logged variables... As far as I can tell, the logger's default settings provide a time stamp for each object. It can be found in the output file in the column corresponding to time_[item_name] (where item_name is the name of a sketchpad, sample, keyboard object or what have you). If your logger is set to log all variables, that information will be present in the output file for every single object in your experiment. If you configure your logger manually, just consult the variables explorer to select and include whatever you need in the output. You can read more about the variables and the time stamp here: https://osdoc.cogsci.nl/3.2/manual/variables/

    So, in summary, I think the most efficient solution for you is to just use OS's built-in time stamps.

    Hope this helps.

    Fabrice.

    Buy Me A Coffee

  • Hi Fabrice,

    Thank you for your detailed answer.

    Do you know what type of timestamp is logged in the time_[item]? Is there a way to convert the logged timestamp to a unix epoch clock timestamp?

    Thanks,

    SH

  • Hi @S_H,

    Not sure what type of time stamp it is (can't find that information in the documentation). Perhaps the developers can answer that. My guess, but it's only my guess, is that it is a startup timestamp and that it is in milliseconds.

    Not sure about the Unix epoch timestamp but isn't the latter the number of seconds that have elapsed since January 1, 1970 at 00:00:00 GMT? If so, I guess that you could just log the date and time of an object at the onset of the experiment and then calculate offline the Unix epoch timestamp based on the timestamp in OS.

    Good luck,

    Fabrice.

    Buy Me A Coffee

  • Thanks @Fab !

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games