Simonton, J.
In April, 1888, the South Carolina Railway Company purchased from the Lackawanna Iron & Coal Company 1,500 tons of steel rails. These rails were absolutely necessary for the purposes of the company, and without them the Camden branch — an important part of its road — could not have been kept up. Three notes were given for the rails, aggregating $50,255.93, maturing in November, 1888. When the purchase was made the president of the railway company promised to pay them out of the earnings of the road, and selected the period of maturity with that end in view. When the notes fell due the company could not pay them, and they were extended for 90 days more. The *31period thus fixed was specially selected because the earnings at that time exceeded the earnings of any other part of the year. One of the notes was paid in September, 1889; the others are still unpaid, aggregating of principal the sum of $85,730.78, interest from March 10, 1889, on $17,784.59, and March 12, 1889, $17,852.19. The South Carolina Railway Company made default of the interest on its second mortgage bonds on April 1, 1888. It made default of the interest on its first mortgage bonds on April 1, 1889. It went into the hands of the receiver October 7, 1889, in proceedings instituted by a second mortgage bondholder in behalf of himself and others of this class for the foreclosure of the second mortgage. During the entire period from the making to the final dishonor of these notes, the gross earnings of the company exceeded the operating expenses. As we have seen, no interest was paid on second mortgage bonds after the giving of these notes. But it appears that after April, 1888, and while these notes were running to maturity, certain bills payable of the railway company were paid out of the earnings, and that these bills were made in order to raise funds which had been applied, among other things, to the payment of interest on second mortgage bonds. The Lackawanna Company now intervenes, and prays that its claim be paid out of the earnings of the road in the hands of the receiver. The supreme court has established that a railroad mortgage, so long as the road is kept a going concern, is a peculiar piece oí property. The holder of a bond secured by such a mortgage takes it with notice that the earnings of the railroad, notwithstanding that they may have been specially pledged for his debt, must first be applied to the current expenses, labor, supplies, equipment, and such permanent improvements as are absolutely necessary before they can be used for the payment of his interest. And if perchance he be paid, leaving these or any of these unpaid, this would be the diversion of the fund, and a person holding any such exceptional claim has an equity, under certain circumstances, to be reimbursed, by having such diversion corrected out of the income in the hands of the company; and, if iri the mean time a receiver has been appointed, out of the earnings in the hands of the receiver. This is an equity founded upon the doctrine that the officers of a railway company are trustees, or, perhaps, we should say the recipients and holders, oí a trust fund, applicable first to claims of this character, and after them to the interest on the mortgage debt. The origin and reason for this equity are found in the fact that a going railroad is of public concern, and must be kept up. Those who contribute to keep it up and so subserve the public weal are rewarded. This equity is enforced whenever suit is brought by the mortgagee to enforce his mortgage, and is held superior to the legal lien of the mortgage. This doctrine was first distinctly set out in Fosdick v. Schall, 99 U. S. 235, and is sustained by a current of authority. Miltenherger v. Railway Co., 106 U. S. 286, 1 Sup. Ct. Rep. 140; Trust Co. v. Souther, 107 U. S. 591, 2 Sup. Ct. Rep. 295; Burnham v. Bowen, 111 U. S. 776, 4 Sup. Ct. Rep. 675. It seems to have been shaken in Kneeland v. Trust Co., 136 U. S. 87, 10 Sup. Ct. Rep. 950; but in Kneeland v. Foundry, etc., Works, 11 *32Sup. Ct. Rep. 858, the court quotes with approval Fosdick v. Schall, and the authorities following it, and reaffirms them. The only qualification laid down is that this equity is put in motion as to such claims only as arose within a reasonable time before the receiver was appointed. The term “a reasonable time” is an unknown, or, perhaps, an uncertain, quantity; at least it depends somewhat on the circumstances of the case and somewhat on the idiosyneracies of the chancellor. See Paine v. Railroad Co., 118 U. S. 159, 6 Sup. Ct. Rep. 1019. One of the cases fixes the limit at 90 days. Miltenberger v. Railway Co., 106 U. S. 288, 1 Sup. Ct. Rep. 140. In Thomas v. Railway Co., 36 Fed. Rep. 817, six months is selected as the limit. Judge Brewer, in Blair v. Railway Co., 22 Fed. Rep. 471, says that six months is the longest time within his knowledge that has ever been given. In the present case 18 months elapsed between the purchase of the rails and the appointment of the receiver.
But, as we have seen, this claim on the part of a material-man is protected by an equity. The officers of the company hold the earnings as a trust fund, in which claims of this character have a preference. The payment of interest to bondholders, these material claims being unpaid, is held to be the use of money belonging to them for the benefit of others, and the diversion of the fund entitles them to recoup. It is difficult, under these circumstances, to see how any creditor of this class can be defeated in his application for reimbursement, unless in analogy to the statute of limitations, or unless such circumstances exist as will induce the court to treat it as a stale claim, or unless he has lost an opportunity of recovering his debt from the company, or unless his laches has operated some change in the position of the mortgage creditor. At the time this debt was incurred the whole railroad property, present and future, was covered by a statutory lien, by a first mortgage, a second mortgage, and an income mortgage. The rails were absolutely necessary to keep the road a going concern. The Lackawanna Company furnished these rails, trusting to the statement of the president of the railway company that they would be paid out of the earnings. These belonged to the company,(Fosdick v. Schall, supra,) and the president could so dispose of them. The authorities quoted show that the Lackawanna Company belongs to a class of creditors who had an equity over these earnings even as against bondholders. When the notes first matured, the railroad company had defaulted on its April and October interest of its second mortgage bonds. No action in the court on the part of the Lackawanna Company could have collected its claim. By pressure on the company it was paid one note. But, as the end of the struggle of the railroad company was inevitable, the Lackawanna Company had the right to rely upon its equity, and to look for payment out of the diverted funds. It seems to me that this claim comes within the principle and the protection of Fosdich v. Schall. The court enforces this equity only as against the parties who seek its aid. He who seeks equity must do equity. So rigidly is this rule applied that when a receiver is appointed at the instance' of a judgment creditor the material-man has *33no relief of this character, because as to such creditor there has been no diversion. Kneeland v. Trust Co., 136 U. S. 90, 10 Sup. Ct. Rep. 950. In the present case the receiver was appointed upon the prayer and at the instance of the second mortgage creditors, and as against them the intervenor has an equity to have the moneys diverted to the payment of their interest restored from such portion of the earnings in the hands of the receiver as now or may become applicable to their interest. In case there are not now, and in the future there will not be, such earnings in the hands of the receiver, then the intervenors may be paid out of that part of the proceeds of sale of the mortgage property to be paid hereafter which shall be applicable to the second mortgage. The rails furnished by the Lackawanna Company were not only a necessity, but they ivere a permanent addition to the value of the road. They were wisely purchased, and were of immediate public benefit. They saved the branch of the road on which they were laid. But the intervenor has no equity as against the first mortgage and other liens superior to the second mortgage. These classes of creditors did not of their own volition come into equity, and the rule cannot be applied to them to do equity. They can stand on their legal vested lien. True, in each instance they filed cross-bills by leave of the court. They could not have been filed without such leave. Indiana S. R. Co. v. Liverpool, London & Globe Ins. Co., 109 U. S 168, 3 Sup. Ct. Rep. 108. A cross-hill is brought either to obtain a discovery of facts in aid of the defense to the original bill, or to obtain full and complete relief to all parties as to the matters charged in the original bill. It cannot introduce any matter not embraced in the original bill, for it is auxiliary to the proceedings in the original suit, and is dependent upon it. The original and cross-bills are so intimately connected together that they constitute but one suit. Ayres v. Carver, 17 How. 591; Shields v. Barrow, Id. 130; Field v. Schieffelin, 7 Johns. Ch. 250. The dismissal of the original bill will dismiss the cross-bill. Dows v. Chicago, 11 Wall. 108; Cross v. DeValle, 1 Wall. 5; Milwaukee & M. R. Co. v. Milwaukee & St. P. R. Co., 6 Wall. 742. It is evident that the cross-bill is a kind of defense, — a proceeding adopted by a party because he has been brought into court by the subpoena, and adopted in order that his whole right bo adjudicated, since the complainant has forced him to put a part in adjudication. This being so, the same equity does not arise against the first mortgage bondholders as against the second. It does not appear how much of the earnings were diverted for the payment of interest on the second mortgage bonds. Let this be done before the special master, and let him report thereon.