Estimate digital signal

I have a device that connect with USB to my computer. This device have digital signal that I can sample it every few seconds. The signal that the device perform, is a digital signal with $X$ seconds of $1$ and $Y$ seconds of $0$ ($X$ and $Y$ are integers and consts).

What I want to do is to estimate if in $Z$ seconds from now, the signal will be $1$. The problem is that I don't know what are $X$ and $Y$ (I don't know how much time $1$ and $0$ are), so I don't know how can I estimate it, and I can sample it every 10 seconds ($X$ and $Y$ can be less then 5). But if I sample $0$ at some moment, the device tells me in how much seconds $1$ will appear again.

I have basic knowledge in signal analysis and I don't know how to do that.

Is it possible at all? If it is, how can I do it?

• If you really mean that you are sampling the digital signal in a USB port once every few seconds (emphasis added), then for all practical purposes, the value of $Z$ can be assumed to be independent of any $X$ and $Y$ that you might have measured some time ago. Aug 2 '14 at 11:06
• @DilipSarwate How can I measure the X and Y if I can sample the device every 10 seconds? X and Y never changed and they are integers. Aug 2 '14 at 11:45

• Thank you, but what can I do if $X + Y$ is shorter then the sample rate? Is there a way to find them? Aug 2 '14 at 18:12