Questions tagged [timers]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
55 views

Execute instructions later

I'm looking to create a function that executes instructions in a time frame. For example I want to call a function that will change my variable in 50 seconds. I have searched but I saw that I need to ...
133 votes
9 answers
41k views

How can a contract run itself at a later time?

In my blockchain application, I would like to have an event triggered at a later time, hours or perhaps even days after the application has most recently received a transaction from a user. How can I ...
18 votes
3 answers
25k views

How do you work with Date and time on Ethereum platform

Is there a way to access Date object in solidity like in JS? If so, wouldn't it be wrong to call solidity deterministic? So i guess if it called so, you can't. So the question is - how do you work ...
1 vote
1 answer
40 views

How do contracts with timing functions get executed?

Let's say, there's a contract with timelock or vesting. In it there's a condition that check whether or not the right time has come, in order to release some tokens to some people. But said condition ...
0 votes
0 answers
19 views

Send Address balance to set address/s after a specific time has passed [duplicate]

I am very new to the space but looking to setup a contract where; After a set period of time (defined in the contract), if the balance of the creator is > 0 + gas, send the remaining contents to a ...
0 votes
1 answer
175 views

Is it possible to call a Contracts function from a set setTimer? Web3JS

I want to be able to call a function of a contract every 60-120 seconds, in my JavaScript code I have a set timer that runs for down a timer from 120 seconds down to 0 by subtracting 0.01 every 10 ...
11 votes
2 answers
633 views

Why can't a contract wake up and run itself?

This question is not about external solutions, but are there technical limitations to why a contract that has funds, can't schedule itself to run at a future block? Could the Ethereum protocol have ...
1 vote
0 answers
23 views

How does the ForceMove protocol handle timed dispute periods?

The main idea behind the ForceMove protocol is that, in a state channel between predefined participants running turn-based applications, lets say 2 for this example (Alice and Bob), if it is Bob's ...
0 votes
2 answers
2k views

how estimate average time for transactions to smart contract

I have created a decentralized application on the Ethereum Blockchain network. This application receives data from different addresses on the blockchain network and saves this data in the blockchain ...
0 votes
1 answer
77 views

Can I record the Time taken for a transaction to complete in Test Net

I am trying to benchmark the time taken for a transaction to execute, can anybody advise me is there anyway I can record the time taken for smart contract transaction to complete?
3 votes
2 answers
377 views

What happens when you put an recursive schedule call with Ethereum Alarm Clock scheduler?

My goal is to schedule a call once every day. [Q] Is it possible to use recursive function to schedule a call once every day using Ethereum Alarm Clock scheduler? Example from following answer ...
4 votes
3 answers
1k views

Is Ethereum Alarm Clock still alive and well?

Lots of questions here reference Ethereum Alarm Clock as a way to schedule events. It seems to my eye to no longer be operative. Is that the case, or am I mistaken? If it's isn't operative, is ...
5 votes
2 answers
1k views

How to deploy Ethereum Alarm Clock contract on a private ethereum network?

Ethereum Alarm Clock: Schedule Contract Function Calls An ethereum contract that facilitates scheduling function calls for a specified block in the future. Function calls can be scheduled to ...
1 vote
1 answer
745 views

how to get input of time in solidity?

I want to run a session for a product in auction , my product struct contains the time interval we need for being the session of the bidding. While initializing a product, I need to take the input of ...
0 votes
1 answer
300 views

I want a function locked for a certain amount of time, what's the safest way to achieve this?

I want a store where someone can become tokenOwner for a certain amount of time. The following solutions seems the easiest: pragma solidity ^0.4.24; import "../node_modules/zeppelin-solidity/...
4 votes
2 answers
66 views

Block archived event inside blockchain

I want to write a gambling smart contract, that will be based on time (on block number in the ethereum blockchain). What is the best way to do some work when current network block will archive some ...
0 votes
2 answers
142 views

Backtimer in smart contract [duplicate]

I want to add a thing to my contract where every 10minutes all the ETH from a contract is sent to my wallet. I don't know how to do it. Any help appreciated
0 votes
1 answer
511 views

Do Solidity functions time out?

I have a design where contract A is calling contract B, which then calls Oraclize a few times, and then sends the results back to contract A. The Oraclize calls could end up taking upwards of 30 ...
6 votes
2 answers
2k views

Email Notifications

Is it possible to add email notification triggers into a smart contract? Could you store a persons email within a contract and at a set date have it send them an email?
0 votes
1 answer
111 views

Which is going to be the very last block of 2017?

I know that the last moment of the year depends in which time zone you are. But lets assume that we want the very last moment, so let's consider the last time zone (+12), I believe is Fiji or New ...
6 votes
2 answers
2k views

How does CryptoKitties track time?

I'm looking at KittyBreeding.sol and see /// @dev Set the cooldownEndTime for the given Kitty, based on its current cooldownIndex. /// Also increments the cooldownIndex (unless it has hit the ...
27 votes
2 answers
12k views

Is block.timestamp safe for longer time periods?

I would like to set a timer like uint timeout = now + 1 year; Is it possible that a miner cheats the timestamp of the block that it's included more then let's say a month. So if I need roughly 1 ...
1 vote
0 answers
70 views

How to resync your time of private ethereum network?

Solidity has special keywords now to return current timestamp. solidity documentation on Globally available variables. uint timestamp = now; //should return current date. With the help of Ethereum ...
1 vote
0 answers
224 views

Using 'now' to check time in Solidity - safe from miner manipulation? [duplicate]

I am writing a contract where I am storing the date/time using 'now' and performing date/time checks on those stored values. My questions is how do you prevent date/time manipulation from miners? If ...
6 votes
2 answers
783 views

How does ethereum alarm clock work if you can't 'wake up'?

Ethereum Alarm Clock. This service claims that it itself is implemented as a smart contract, but how is that possible? I thought the whole reason it existed was because A contract can't wake up ...
3 votes
1 answer
466 views

Do ethereum contracts stay active if it has to wait for a condition to happen? How is the TIME element factored into smart contracts? [duplicate]

I haven't written any contract yet, but would like to know if this is something that can be done. Lets say I write a smart contract to pay someone if his ethereum address goes below a certain amount ...